flutter_text_to_speech 3.0.7 copy "flutter_text_to_speech: ^3.0.7" to clipboard
flutter_text_to_speech: ^3.0.7 copied to clipboard

An on-device Flutter Text-to-Speech plugin

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:flutter_text_to_speech/flutter_text_to_speech.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    VoiceController controller = FlutterTextToSpeech.instance.voiceController();
    controller.init().then((_) {
      controller.speak(
          "testing audio output", VoiceControllerOptions(delay: 5));
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
      ),
    );
  }
}
11
likes
30
points
36
downloads

Publisher

verified publisherrishabnayak.com

Weekly Downloads

An on-device Flutter Text-to-Speech plugin

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_text_to_speech