stts 1.2.4 copy "stts: ^1.2.4" to clipboard
stts: ^1.2.4 copied to clipboard

Speech-to-Text and Text-to-Speech plugin. Offline first.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:stts_example/stt_page.dart';
import 'package:stts_example/tts_page.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      routes: <String, WidgetBuilder>{
        '/stt': (BuildContext context) => const SttPage(),
        '/tts': (BuildContext context) => const TtsPage(),
      },
      home: Builder(builder: (context) {
        return Scaffold(
          appBar: AppBar(title: const Text('STTS app')),
          body: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                ElevatedButton(
                  onPressed: () {
                    Navigator.of(context).pushNamed('/stt');
                  },
                  child: Text('Speech to text'),
                ),
                SizedBox(height: 50),
                ElevatedButton(
                  onPressed: () {
                    Navigator.of(context).pushNamed('/tts');
                  },
                  child: Text('Text to speech'),
                ),
              ],
            ),
          ),
        );
      }),
    );
  }
}
7
likes
160
points
810
downloads

Publisher

verified publishercow-level.ovh

Weekly Downloads

Speech-to-Text and Text-to-Speech plugin. Offline first.

Repository (GitHub)

Topics

#speech-to-text #speech-recognition #text-to-speech #tts #voice-synthesizer

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, stts_platform_interface, stts_web

More

Packages that depend on stts