RestComm / Restcomm-Connect

The Open Source Cloud Communications Platform
http://www.restcomm.com/
GNU Affero General Public License v3.0
242 stars 215 forks source link

IFLYTEK TTS integration #1129

Open agnoix opened 8 years ago

agnoix commented 8 years ago

Integrates a IFLYTEK TTS (Most popular Chinese TTS) into Restcomm

gvagenas commented 8 years ago

Hi @agnoix , thanks for your help to the project. I will try here to provide the basics needed to create a new TTS integration with the this provider. So you can check existing maven module, restcomm.tts.voicerss and follow the same design at your new module.

To wire this new TTS service to Restcomm you need to provide new configuration at restcomm.xml similar to the one we have for Voice RSS - https://github.com/RestComm/Restcomm-Connect/blob/ba4cc4e399dd4dcc143c161a749dec8d2a51c499/restcomm/restcomm.application/src/main/webapp/WEB-INF/conf/restcomm.xml#L417-L417

Providing a new configuration that points the new TTS module class, will be enough for Restcomm to instantiate the new TTS service. Restcomm will create a new TTS service for every call - https://github.com/RestComm/Restcomm-Connect/blob/de3d2f0e5fa671c1551a93fcd581bafe4d5b01e5/restcomm/restcomm.interpreter/src/main/java/org/mobicents/servlet/restcomm/interpreter/BaseVoiceInterpreter.java#L742-L742

Last you should also check the auto-config script and change accordingly so a user can enable this new TTS engine, check - https://github.com/RestComm/Restcomm-Connect/blob/aaa910a006b0623d0f8f8d7f102db60cca844840/restcomm/configuration/config-scripts/as7-config-scripts/restcomm/restcomm.conf#L79

Thanks George

deruelle commented 8 years ago

@agnoix were you able to move forward on that ?