Reply To: Using Flite to pronounce a word a certain way

Home Forums OpenEars Using Flite to pronounce a word a certain way Reply To: Using Flite to pronounce a word a certain way

Halle Winkler

I have looked into it briefly in the course of my own attempts to improve the pronunciation in AllEars, but I don’t have functional code to share with you because I ended up choosing to not do this with Flite. I can’t remember what the exact reason was but early on in the troubleshooting process I decided to keep it simpler.

My not-finished idea was to give Flite SSML text:

Which it is meant to support. I can’t remember if I couldn’t get it working, or got it partially working and then found out that it didn’t give fine-grained enough control, or what the issue was.

You can give Flite SSML input as a text file with the function:

float flite_ssml_to_speech(const char *filename,
cst_voice *voice,
const char *outtype)

Which you can search the library for. Getting the output over to the FliteController method as a waveform I have no advice on, but I’m sure it’s possible. Hope this is helpful.

There is also a function for giving Flite explicit phones:

float flite_phones_to_speech(const char *text,
cst_voice *voice,
const char *outtype)

Which may be helpful if there is some method that I haven’t come across for marking a phone for emphasis, although my recollection is that it results in equal emphasis for all phonemes, i.e. robot voice.

A good place to look for implementation templates is the main() of flite.c that is part of the Flite download.