Reputation: 16663
I'm editing the Cloud Functions for Firebase
on the Fulfillment page on DialogFlow. I'm trying to respond to an Intent
with an audio file playback. Specifically I'm targeting the Telephony integration.
I understand that a text message like
<speak><audio src="https://actions.google.com/sounds/v1/alarms/bugle_tune.ogg"></audio></speak>
Should play the audio.
But what is the interface to send it back so it would work?
Just using agent.add()
doesn't seem to work (it reads the SSML string outloud)
Upvotes: 3
Views: 658
Reputation: 691
You cannot use the client API library to do this at this time. You'll need to craft the JSON response yourself. Please see my answer here which should be helpful: DIalogflow Telephony integration is interpreting SSML response from webhook as normal text
Basically do the same but use TelephonyPlayAudio instead of TelephonySynthesizeSpeech.
Upvotes: 2