2

Having read about the the libflite library in man ffmpeg-filters I am already familiar enough with it to make ffplay speak in different voices, like so:

ffplay -f lavfi flite=text='Love':voice=kal
ffplay -f lavfi flite=text='Love':voice=slt

How do I list all the voices available in the libflite library? I've tried ffmpeg -f lavfi flite=list_voices=1 but I get Requested output format 'lavfi' is not a suitable output format flite=list_voices=1: Invalid argument

John Smith
  • 130
  • 6

2 Answers2

2

According to the Armadeus project - Flite, these are :

$flite -lv
Voices available: kal awb_time kal16 awb rms slt

You may also see this list in the source file asrc_flite.c line 91 :

static struct voice_entry voice_entries[] = {
    MAKE_VOICE_STRUCTURE(awb),
    MAKE_VOICE_STRUCTURE(kal),
    MAKE_VOICE_STRUCTURE(kal16),
    MAKE_VOICE_STRUCTURE(rms),
    MAKE_VOICE_STRUCTURE(slt),
};

For more information see FFMPEG-FILTERS(1).

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • 1
    Thanks, it works. In order to run `flite -lv` I had to install it first: `sudo apt install flite`. Before installing it I just had `libflite1` installed and it was enough to use the library with `ffplay` and `ffmpeg`. – John Smith Nov 06 '22 at 14:11
2

Here is how to properly ask the filter flite to list voices from FFMPEG:

ffmpeg -f lavfi -i "flite=list_voices=true"

Your attempt was just missing a -i in front of the filter, and replace 1 with true. Filters like flite, which don't take in Audio/Video as input, can be used as input themselves when using lavfi. Another example of this is the mandelbrot filter; while flite outputs audio, mandelbrot outputs video.

Available voice options for flite as of FFMPEG gitmaster dated 2023/06/08:

awb
kal
kal16
rms
slt
programmar
  • 131
  • 3
  • `ffmpeg -f lavfi -i "flite=list_voices=true"` raises "Error opening input file flite=list_voices=true." – Apostolos Aug 13 '23 at 17:25
  • @Apostolos Are you running the latest git master version? If so it should work unless maybe your console handles quotes differently. you can alternatively try removing the quotes or also try `ffmpeg -filter_complex flite=list_voices=true` – programmar Aug 24 '23 at 20:42
  • The error I mentioned was from ffmpeg 4.0. I upgraded to 6.0 and it shows the 5 voices. But since ffmpeg loves showing error messages --can't do without them, they are part of its insanity-- after showing the list, it ends with another error this time: "Error processing filtergraph" (when -f lavfi is used) and "Error initializing filters" (when -filter_complex is used). Thanks anyway. – Apostolos Aug 25 '23 at 04:30