flutter_dialogflow
flutter_dialogflow copied to clipboard
How to set audio response?
Hi,
The example is a sword, it works great! but how do you get an audio response? or how do I perform the audio response in flutter?
Thanks to those who answer.
try this...
- go to DIalogFlow -> Agent Properties -> Speech -> Enable Text To Speech
in the code
- in dialogflow_v2.dart
in AIResponse({Map body}) {...}
Add _outputAudio = body['outputAudio'];
this is in very large String format, so convert it to Base64 and i guess you can play it with some Audio plugin.
Thank You, Sorry but not so easy for me. Could you post some code?
'That's one small step for a man, one giant leap for mankind' by N. A.