Watch on youtube.com


Official documentation says:

Synthesize a voice utterance using the libflite library.

To enable compilation of this filter you need to configure FFmpeg with --enable-libflite.

Note that versions of the flite library prior to 2.0 are not thread-safe.

The filter accepts the following options:

  • 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.

[me@host: ~]$ cat shesha.txt
She sells seashells by the seashore, The shells she sells are seashells, I'm sure.
So if she sells seashells on the seashore, Then I'm sure she sells seashore shells.
[me@host: ~]$ for v in awb kal kal16 rms slt ; do ffplay -f lavfi -i "flite=textfile=shesha.txt:voice=${v}" -autoexit ; done
see also

Using FFMPEG on Docker