HomeiOS Developmentios - flutter SpeechRecognitionError solely on Simulator iPhone SE/14/14pro, however engaged on...

ios – flutter SpeechRecognitionError solely on Simulator iPhone SE/14/14pro, however engaged on actual iPhone machine


The speech recognition operate is working nicely on actual iPhone machine, however cannot work on the simulator iPhone SE/14/14pro…
All permissions are allowed on the simulators.

import 'bundle:speech_to_text/speech_recognition_result.dart';
import 'bundle:speech_to_text/speech_to_text.dart';
...
  void _initSpeech() async {
    _speechEnabled = await _speech.initialize(
      onStatus: (val) => print('🎤 onStatus: $val'),
      onError: (val) => print('🎤 onError: $val'),
    );
    setState(() {
    });
  }
  void _startListening() async {
    print("👂 _startListening, present isListen: ${_speech.isListening}");
    await _speech.pay attention(
      onResult: _onSpeechResult,
      listenFor: const Period(seconds: 30),
      partialResults: true,
      localeId: 'en_US',);
    setState(() {});
  }
...

The console:

enter image description here

flutter: 👂 _startListening, present isListen: false
flutter: 🎤 onStatus: notListening
flutter: 🎤 onError: SpeechRecognitionError msg: error_listen_failed, everlasting: true
flutter: 🎤 onStatus: performed
flutter: 🎤 onStatus: notListening
flutter: 🎤 onStatus: performed
flutter: 🎤 onError: SpeechRecognitionError msg: error_retry, everlasting: true

I have never discovered a working approach for such case, respect any assist.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments