speech_to_text_ultra 0.0.3 copy "speech_to_text_ultra: ^0.0.3" to clipboard
speech_to_text_ultra: ^0.0.3 copied to clipboard

Introducing a Flutter package solving sudden pauses during speech recognition. Manual pause/play allows uninterrupted dictation, enhancing user experience for seamless interaction.

example/lib/main.dart

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

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

class SpeechToTextUltraWidgetImplementation extends StatefulWidget {
  const SpeechToTextUltraWidgetImplementation({super.key});

  @override
  State<SpeechToTextUltraWidgetImplementation> createState() => _SpeechToTextUltraWidgetImplementationState();
}

class _SpeechToTextUltraWidgetImplementationState extends State<SpeechToTextUltraWidgetImplementation> {
  bool mIsListening = false;
  String mEntireResponse = '';
  String mLiveResponse = '';

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        backgroundColor: Colors.teal,
        centerTitle :true,
        title: const Text('Speech To Text Ultra',style: TextStyle(fontSize: 20,fontWeight: FontWeight.w500),),
      ),
      body: Center(
        child: SingleChildScrollView(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              mIsListening
                  ? Text('$mEntireResponse $mLiveResponse')
                  : Text(mEntireResponse),
              const SizedBox(height: 20),
              SpeechToTextUltra(
                ultraCallback:
                    (String liveText, String finalText, bool isListening) {
                  setState(() {
                    mLiveResponse = liveText;
                    mEntireResponse = finalText;
                    mIsListening = isListening;
                  });
                },
                // toPauseIcon: const Icon(Icons.pause),
                // toStartIcon: const Icon(Icons.mic),
                // pauseIconColor: Colors.black,
                // startIconColor: Colors.black,
              ),
              const SizedBox(
                height: 10,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
20
likes
140
points
156
downloads

Publisher

unverified uploader

Weekly Downloads

Introducing a Flutter package solving sudden pauses during speech recognition. Manual pause/play allows uninterrupted dictation, enhancing user experience for seamless interaction.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, speech_to_text

More

Packages that depend on speech_to_text_ultra