Open hrosa opened 8 years ago
First requirement is to create a plug-in mechanism that loads the TTS engine during bootstrap. The configuration part of RMS will look like:
<tts>
<engine>org.mobicents.media.server.tts.voicerss.VoiceRssEngine</engine>
<configuration>/path/to/configuration/file.xml</configuration>
</tts>
Notice how the classname is provided, so the RMS Bootstrapper can load it via reflection. It should also receive a path to the configuration file that holds the configuration parameters of the TTS Engine.
(source)
We encourage to develop a TTS Engine for VoiceRSS, which is default open-source provider for RestComm TTS nowadays. Contributors may look at RestComm VoiceRSS module to check implementation details.
The Voice RSS configuration can be placed in the MS_HOME/conf folder and look something like this.
<voicerss class="org.restcomm.connect.tts.voicerss.VoiceRSSSpeechSynthesizer">
<service-root>http://api.voicerss.org</service-root>
<apikey></apikey>
<languages>
<catalan>ca-es</catalan>
<chinese-china>zh-cn</chinese-china>
<chinese-hongkong>zh-hk</chinese-hongkong>
<chinese-taiwan>zh-tw</chinese-taiwan>
<danish>da-dk</danish>
<dutch>nl-nl</dutch>
<english-australia>en-au</english-australia>
<english-canada>en-ca</english-canada>
<english-greatbritain>en-gb</english-greatbritain>
<english-india>en-in</english-india>
<english-us>en-us</english-us>
<finish>fi-fi</finish>
<french-canada>fr-ca</french-canada>
<french-france>fr-fr</french-france>
<german>de-de</german>
<italian>it-it</italian>
<japanese>ja-jp</japanese>
<korean>ko-kr</korean>
<norwegian>nb-no</norwegian>
<polish>pl-pl</polish>
<portuguese-brasil>pt-br</portuguese-brasil>
<portuguese-portugal>pt-pt</portuguese-portugal>
<russian>ru-ru</russian>
<spanish-mexico>es-mx</spanish-mexico>
<spanish-spain>es-es</spanish-spain>
<swedish>sv-se</swedish>
</languages>
</voicerss>
The VoiceRssEngine contains all the logic to parse the configuration file and load all necessary dependencies to make the engine work.
Finally, the final solution will be broken into 2 different modules:
Migrate RestComm TTS capabilities to the Media Server.
TTS capabilities can be mixed with MGCP Signals, which greatly simplifies RestComm application workflows as everything can be encoded in a single MGCP command. Example: IVR menu with announcement and fallback TTS when a user fails to press valid digit.