I need help understanding the way SSML works for google action.
I would like a sound to be played when my intent is called something like so:
function playAudio(assistant) {
let text_to_speech = '<speak>'
+ 'I can play a sound'
+ '<audio src="https://actions.google.com/sounds/v1/alarms/digital_watch_alarm_long.ogg">a digital watch alarm</audio>. '
+ '</speak>'
assistant.tell(text_to_speech);
};
app.intent('my-intent', (conv) => {
playAudio(conv);
});
It seems that this is the wrong syntax for such a function, I am not sure how i am supposed to appropriately call playAudio(), it seems that 'conv' is not the correct parameter.