Text To Speech in SDK
External client TTS allows a client to use pre-recorded or synthesized on SDK side phrases in the dialogue graph.
The first thing you need to do to use external client TTS is create a handler function that takes text and voice info from #say commands as input and returns audio format and data as output.
Supported formats: wav, mp3, pcm16.
The handler must provide a TtsResponse object for each text field in the phrases section from
phrasemap.json, otherwise, the job will fail to start.
config.json file passed to app.addSessionConfig or in arguments of app.addSessionConfig (when you are using an inline version of configs) you need to change configName field to an "ExternalClient" in tts section of the configuration. This option says Dasha, that she should ask your application for audio-records instead of generation them.
After that all you need to do is set a created handler to a registered app via the special method.