Text To Speech
There are a number of TTS engines (flite, festival, cepstral..) so it would be good to provide TTS in a 'generic' way.
Basically, any TTS module should provide some macros:
- TTS-SayText? to say any random piece of text, like an announcement, the weather, etc.
- TTS-SayName? used specifically to say a name (ie, by the directory application, or voicemail)
- If no TTS module is installed, the default asterisk SayAlpha? can be used, where it simply reads out the letters
- TTS-SayNumbers? used specifically to say a number
- If no TTS module is installed, the default asterisk SayNumber? can be used
- TTS-SayDigits? used specifically to read out digits one-by-one
- If no TTS module is installed, the default asterisk SayDigits? can be used
I'm not sure how to handle SayText? in the case no TTS module is available - maybe it wouldn't come up, since nothing would call it unless it specifically uses TTS?
For the rest of them, fallback is important. In fact, every instance where SayAlpha? SayDigits? etc is used should be changed to use some a macro, so it can call the TTS module's implementation. We'd need to do this in a way where the macro can check if TTS is available (eg, set a TTSENGINE variable, so it runs macro-${TTSENGINE}-SayText?, for example, macro-festival-saytext. If the variable is not set, then it can use the built-in asterisk functions.
Tickets: #1012
System Recordings
TTS modules should also have something in the interface that allows users to enter some text, and have it saved as a system recording using text to speech. It should just appear with any other custom recordings, so it could be used as an IVR menu or for other prompts. (See #934)
