Synthesize a voice utterance using the libflite library.
To enable compilation of this filter you need to configure FFmpeg with
--enable-libflite
.
Note that the flite library is not thread-safe.
The source accepts parameters as a list of key=value pairs, separated by ":".
The description of the accepted parameters follows.
- list_voices
-
If set to 1, list the names of the available voices and exit immediately. Default value is 0.
- nb_samples, n
-
Set the maximum number of samples per frame. Default value is 512.
- textfile
-
Set the filename containing the text to speak.
- text
-
Set the text to speak.
- voice, v
-
Set the voice to use for the speech synthesis. Default value is
kal
. See also the list_voices option.
Examples
-
Read from file speech.txt, and synthetize the text using the standard flite voice:
flite=textfile=speech.txt
-
Read the specified text selecting the
slt
voice:flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
-
Make ffplay speech the specified text, using
flite
and thelavfi
device:ffplay -f lavfi flite='No more be grieved for which that thou hast done.'
For more information about libflite, check: http://www.speech.cs.cmu.edu/flite/