alan_voice 2.0.6 copy "alan_voice: ^2.0.6" to clipboard
alan_voice: ^2.0.6 copied to clipboard

outdated

Alan voice plugin. One can easily add voice interaction to exisiting app with this plugin See more on the homepage and in the docs section - https://alan.app/docs/intro.html

alan_voice #

Alan voice plugin

About #

This plugin helps you to integrate Alan voice experience into your Flutter app

Quickstart #

Add Alan Voice dependency to your app

your pubspec.yaml file:

dependencies:
  flutter:
    sdk: flutter
    ...
    
  alan_voice: 2.0.6

We will use Flutter sample app from here: https://github.com/nisrulz/flutter-examples/tree/master/stateful_widget

Clone this repo and open main.dart file.

First add alan_voice package dependency

import 'package:alan_voice/alan_voice.dart';

Than locate MyButtonState class paste following code into it:

class MyButtonState extends State<MyButton> {

  //PASTE THESE LINES -\/-
  bool _enabled = false; //start button state

  void _initAlanButton() async {
    //init Alan with sample project id
    AlanVoice.addButton("8e0b083e795c924d64635bba9c3571f42e956eca572e1d8b807a3e2338fdd0dc/stage");

    setState(() {
      _enabled = true;
    });
    
   // -------/\------- 
}

And now modify main widget:

  1. locate this string
Text(displayedString, style: TextStyle(fontSize: 40.0)),

and change it to

Text("Alan voice example", style: TextStyle(fontSize: 40.0)),
  1. locate following line in the RaisedButton widget params:
onPressed: onPressOfButton

and change it to

onPressed: _initAlanButton
  1. That's it. Now run your app and press the button!

See this page for more info.

115
likes
0
points
308
downloads

Publisher

unverified uploader

Weekly Downloads

Alan voice plugin. One can easily add voice interaction to exisiting app with this plugin See more on the homepage and in the docs section - https://alan.app/docs/intro.html

Homepage

Documentation

Documentation

License

unknown (license)

Dependencies

flutter, package_info

More

Packages that depend on alan_voice