Dialogflow don't reproduce audio in Phone or Smart Media


#1

Hi. I’m testing an ACTION of mine with audio. I’m using the dialogflow (“jovo-platform-googleassistant”: “^ 3.3.0”), and in SIMULATOR, it works only when I select the Speaker.

const audioNome = [
"https://imgs-skills.s3.amazonaws.com/home_assistant/sounds/campainha.mp3",
"https://imgs-skills.s3.amazonaws.com/home_assistant/sounds/campainha.mp3",
]
let introVoz = this.speechBuilder().addAudio(audioNome[0]).addAudio(audioNome[1]);
return this.ask(introVoz);

This error ocurred:
MalformedResponse at final_response.rich_response.items[0].simple_response: ‘display_text’ must be set or ‘ssml’ must have a valid display rendering

{
 insertId: "19ih5i6g9xo1vsi"  
 labels: {…}  
 logName: "projects/testebd-pcox/logs/actions.googleapis.com%2Factions"  
 receiveTimestamp: "2020-12-30T23:49:36.485307648Z"  
 resource: {…}  
 severity: "ERROR"  
 textPayload: "MalformedResponse at final_response.rich_response.items[0].simple_response: 'display_text' must be set or 'ssml' must have a valid display rendering"  
 timestamp: "2020-12-30T23:49:36.474407374Z"  
 trace: "projects/1039083041399/traces/ABwppHGYwbjxb5tG6NokX2HY8N6Y-OEzz8ZPgB-pSobL45Nvqtle3du8cHLzPTM-8xtagPSHgVqiK2Al"  
}

How to fix it?


#2

Solved!

let introVoz = this.speechBuilder().addAudio(audioNome[0], 'any text').addAudio(audioNome[1], 'anytext');