concept flexible distribution in category Keras

This is an excerpt from Manning's book Probabilistic Deep Learning: With Python, Keras and TensorFlow Probability.
6.1.1 Multinomial distribution as a flexible distribution
A 2016, an example of a real-world task requiring flexible distribution was Google's WaveNet. This model is used to generate astonishingly real-sounding artificial speech from text. Go to https://cloud.google.com/text-to-speech/ for a demonstration on text of your choice. The architecture is based on 1-D causal convolutions, like the ones you saw in chapter 2 (section 2.3.4), and their specialization, called dilated convolutions, which are shown in the notebook https://github.com/tensorchiefs/dl_book/blob/master/chapter_02/nb_ch02_04.ipynb. If you’re interested in the architecture, you might also read the blog post https://deepmind.com/blog/wavenet-generative-model-raw-audio/. WaveNet works directly on raw audio. Usually a sampling rate of 16 kHz (16 kiloHertz) is used, which is 16,000 samples per second, but higher sampling rates are also in use. The audio signal for each time point t is then discretized (typically one uses 16-bit). For example, the audio signal at time point t, xt takes discrete values from 0 to
. But the interesting piece for this chapter is the probability part (stuff from the probability shelf on the right side of figure 5.1). In WaveNet, we assume that xt depends only on audio signals of samples earlier in time, so: