3

In the Translation prebuilt app it seems it can response in different language based on user input, but I could not figure out how to specify it in my fulfillment hook.

SSML has a <lang> tag but it does not seems to be supported by Actions on Google, I suppose I can use <audio> and another API to get audio for the other language?

If that is not possible can we specify language for a response?

Prisoner
  • 49,922
  • 7
  • 53
  • 105
Cash Lo
  • 1,052
  • 1
  • 8
  • 20
  • Dialogflow, itself, doesn't support SSML. Are you using it with the Google Assistant or some other platform? – Prisoner Jan 15 '18 at 16:29
  • Yes! I realize I have been thinking this wrong now, I am actually talking about the response to the Google Assistant API. – Cash Lo Jan 15 '18 at 16:34

1 Answers1

1

You can not specify a specific language for a response since the language is bound to the user's locale. Using an <audio> tag would be a valid option to return the desired response in your language of choice. However you'd need to have all the audio files available on an HTTPS server or generate them at runtime, and the Assistant seems to have some issues with the latter.

Similar thread: Bilingual spoken flash cards for Google Assistant

Bart
  • 498
  • 2
  • 8