flutter_azure_speech_fix 0.1.0 copy "flutter_azure_speech_fix: ^0.1.0" to clipboard
flutter_azure_speech_fix: ^0.1.0 copied to clipboard

Flutter implementation of Microsoft Azure Speech Speech-To-Text Fix

flutter_azure_speech #

pub.dev

Flutter implementation of Microsoft Azure Speech service

  • Speech to Text [Done]
  • Text to Speech [InProgress]

Getting Started #

Initialise the framework with your Region and Subscription key

Future<void> _initializeSpeechRecognition() async {
    try {
      await _flutterAzureSpeechPlugin.initialize(
          "YOUR SUBSCRIPTION KEY", "YOUR REGION");
    } catch (e) {
      print('Error initializing speech recognition: $e');
    }
  }

Speech to Text #

Start the speech recognition process by calling the getSpeechToText method.

Future<void> _startSpeechRecognition() async {
    try {
      setState(() {
        _recognizedText = "Listening...";
      });

      String recognizedText =
          await _flutterAzureSpeechPlugin.getSpeechToText("zh-CN") ?? "";

      setState(() {
        _recognizedText = recognizedText;
      });
    } catch (e) {
      print('Error during speech recognition: $e');

      setState(() {
        _recognizedText = "An error occurred during speech recognition.";
      });
    }
  }
1
likes
150
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter implementation of Microsoft Azure Speech Speech-To-Text Fix

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_azure_speech_fix

Packages that implement flutter_azure_speech_fix