alan_voice 1.2.2 copy "alan_voice: ^1.2.2" to clipboard
alan_voice: ^1.2.2 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: 0.5.0    

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 Remove everything from it and paste following code:

class MyButtonState extends State<MyButton> {
  bool _enabled = true; //start button state

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

    setState(() {
      _enabled = false;
    });
}

And now modify main widget:

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

and change it to

new Text("Alan voice example", style: new 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: https://docs-stage.alan.app/docs/intro.html for more info.

114
likes
0
points
496
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

License

unknown (license)

Dependencies

flutter, package_info

More

Packages that depend on alan_voice