A Flutter application to showcase how to interact with Azure DirectLine bot API and Azure Cognitive Services Speech Service API.
In this project we use several packages from pub.dev
- Bloc state management plugin
- Lottie animation plugin purely written in Dart
- Http plugin, future enabled
- Get_it service locator plugin inspired in Splat
- Speech_to_text plugin to access native capabilities
- Flutter_sound plugin to play streaming audio
Lottie animations are free animations downloaded from LottieFiles
Thanks for all contributors to those amazin plugins for the work done.
This demo project is mainly tested in Android, but it will run easily on iOS and Web with little changes due to native speech to text changes. Other systems like desktop would need extra work as Flutter_sound plugin only supports mobile and web.
To test the project, you need to edit constants.dart and replace the dummy values with your own azure keys and URLs:
//BOT CONSTANTS
const String botApiKey = "[PUT HERE YOUR DIRECTLINE API KEY]";
//SPEECH SERVICE CONSTANTS
const String authHost = "[PUT HERE YOUR SPEECH REGION].api.cognitive.microsoft.com";
const String voiceHost = "[PUT HERE YOUR SPEECH REGION].tts.speech.microsoft.com";
const String speechApiKey = "[PUT HERE YOUR SPEECH SERVICE API KEY]";