alessandroTironi / Unity-DialogflowV2Agents

A client for Google Dialogflow V2 APIs that allows to model conversational agents.
MIT License
27 stars 9 forks source link

Missing voice settings support #9

Closed alessandroTironi closed 1 year ago

alessandroTironi commented 3 years ago

Hello, thanks for such a great plugin. Since they changed to V2, I couldn't find anything that would help me connect my chatbot with unity.

I have tested with my own, it works, however, any idea why the voice is the same (standard male voice) even after I have changed the TTS settings in my Dialogflow console?

In the console it shows me the output audio as I have set (female voice with UK accent) but in the Unity project is still a male voice. Please let me know if you have any ideas of what could be the issue here.

Once again, legend, thanks so much.

Originally posted by @alvarocaiza in https://github.com/alessandroTironi/Unity-DialogflowV2Agents/issues/7#issuecomment-735992240

alessandroTironi commented 3 years ago

Hi, I am sorry for how late this response comes. I am not working on this project anymore and I did not work on voice settings, but I think that the best thing to do in these cases is referring to the Google documentation about the entity system of a DF request. In particular, the DFOutputAudioConfig class currently implemented is missing some parameters that should allow to set the voice settings. I doubt that the output audio being a male voice depends on some Unity settings, since the plugin is simply reading the raw audio bytes sent by Dialogflow, so it should be a matter of sending the right parameters through the detect intent request.

amitkumbhar14 commented 3 years ago

Hi @alvarocaiza @alessandroTironi did you find anything on voice setting parameters for female voice ? Please let me know. That would be a great help. Thanks

alessandroTironi commented 3 years ago

From OutputAudioConfig, navigate through SynthesizeSpeechConfig and finally VoiceSelectionParams. This last object has a param named "ssmlGender", that should allow to select the gender's voice. All you have to do is ensuring that DF receives a JSON with these parameters.