How can I change the voice for the Text to speech feature?
I am using the Speech recognition feature from the 'Speech' branch and I am able to do the conversion from text-to-speech as well as text-to-speech back.
However, I wish to be able to modify the voice used for the text-to-speech part as it is very robotic and unpleasant right now. Are there options to chose from? If not could you please provide some instructions on how to go about customising it.
Thanks
@shahidkhuram @w-Yuan can you help?
@mohit-jcc take a look at CognitiveServices.SpeechSynthesizer in latest sample sample: https://github.com/Microsoft/BotFramework-WebChat/blob/speech/samples/speech/index.html
This uses cognitive services for text to speech. You can pass the voiceName property to ICognitiveServicesSpeechSynthesisProperties to control which voice is used.
For the set of voices supported by cognitive services, please see https://docs.microsoft.com/en-us/azure/cognitive-services/Speech/api-reference-rest/bingvoiceoutput#a-namesuplocalesasupported-locales-and-voice-fonts
I'd suggest "Microsoft Server Speech Text to Speech Voice (en-US, JessaRUS)"
hope that helps.
is there a way to change the rate the voice speaks at?
You can control that using using the SSML that's sent to the speech service. Specifically, you can use the rate attribute on the prosody element: https://msdn.microsoft.com/en-us/library/office/hh361583(v=office.14).aspx
You can control this from your bot so that the SSML returned in the response contains the correct attribute. Alternatively, (thought not recommended), you could inspect and update the SSML in the webchat control as well if you want apply the speech-rate in the webchat instead of the bot.