0
votes

I'm using dialogflow and my current script returns the response of the agent in a textual format via: content.queryResult.fulfillmentText; I want to also return the synthesised audio response, I'm using Dialogflow API.v2.

1

1 Answers

1
votes

If you go to the settings in your Dialogflow agent, in the "Speech" tab, you can toggle-on the "Enable Automatic Text to Speech" option to always generate the audio for a conversation.

In addition, there's more settings that you can tune to control the Voice Configuration.

Dialogflow Speech information

You can also set this configuration in a per-request basis by using the outputAudioConfig parameter in the DerectIntentRequest.

Finally, you can find the audioOutput in the DetectIntentResponse.