flutter_dialogflow icon indicating copy to clipboard operation
flutter_dialogflow copied to clipboard

How to set audio response?

Open Webbyou opened this issue 6 years ago • 2 comments

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.

Webbyou avatar Jul 17 '18 23:07 Webbyou

try this...

  1. go to DIalogFlow -> Agent Properties -> Speech -> Enable Text To Speech

in the code

  1. 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.

toleds avatar Jul 23 '19 08:07 toleds

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.

Webbyou avatar Nov 09 '19 10:11 Webbyou