# flutter_speech **Repository Path**: sunyix/flutter_speech ## Basic Information - **Project Name**: flutter_speech - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-08-01 - **Last Updated**: 2025-08-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # flutter_speech_recognition Based on [rxlabz plugin](https://github.com/rxlabz/speech_recognition) Objective C and Java Flutter plugin. A flutter plugin to use the speech recognition iOS10+ / Android 4.1+ and MacOS 10.15+ ## Setup: ### iOS and MacOS Add this on your `Info.plist` ``` NSMicrophoneUsageDescription This application needs to access your microphone NSSpeechRecognitionUsageDescription This application needs the speech recognition permission ``` ### Android Nothing to do :) ## Usage: ``` //.. _speech = SpeechRecognition(); // The flutter app not only call methods on the host platform, // it also needs to receive method calls from host. _speech.setAvailabilityHandler((bool result) => setState(() => _speechRecognitionAvailable = result)); // handle device current locale detection _speech.setCurrentLocaleHandler((String locale) => setState(() => _currentLocale = locale)); _speech.setRecognitionStartedHandler(() => setState(() => _isListening = true)); // this handler will be called during recognition. // the iOS API sends intermediate results, // On my Android device, only the final transcription is received _speech.setRecognitionResultHandler((String text) => setState(() => transcription = text)); _speech.setRecognitionCompleteHandler(() => setState(() => _isListening = false)); // 1st launch : speech recognition permission / initialization _speech .activate() .then((res) => setState(() => _speechRecognitionAvailable = res)); //.. speech.listen(locale:_currentLocale).then((result)=> print('result : $result')); // ... speech.cancel(); // || speech.stop(); ```