-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Hi,
Not sure who's maintaining the repo on this. I'm sure this is a pretty popular request.
But one suggestion is to include the outputAudio in the AIResponse class:
class OutputAudio {
ByteData _outputAudio;
...
}
class AIResponse {
String _responseId;
QueryResult _queryResult;
num _intentDetectionConfidence;
String _languageCode;
DiagnosticInfo _diagnosticInfo;
WebhookStatus _webhookStatus;
OutputAudio _outputAudio; // define and add OutputAudio class
AIResponse({Map body}) {
// add this
_outputAudio = body['outputAudio'];
_responseId = body['responseId'];
_intentDetectionConfidence = body['intentDetectionConfidence'];
_queryResult = new QueryResult(body['queryResult']);
_languageCode = body['languageCode'];
_diagnosticInfo = (body['diagnosticInfo'] != null
? new DiagnosticInfo(body['diagnosticInfo'])
: null);
_webhookStatus = body['webhookStatus'] != null
? new WebhookStatus(body['webhookStatus'])
: null;
}"
// and finally, add one getter:
OutputAudio get outputAudio {
return _outputAudio;
}
You can then choose to use any audio player on the output audio.
Just a suggestion.
Metadata
Metadata
Assignees
Labels
No labels