You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing an issue with the SpeechToText package when trying to listen for speech input with the locale fa_IR on iOS. The following exception is thrown:
flutter: [ERROR
/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Instance of 'ListenFailedException' #0 SpeechToText.listen (package
/speech_to_text.dart:465:7) #1 ActController.startListening (package
/features/act/presentation/controllers/act_controller.dart:365:5) [ERROR
/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: TimeoutException after 0:00:30.000000: Future not completed
The issue only occurs on iOS with the locale fa_IR. It works perfectly fine on Android and Web with the locale fa_IR
and work on ios with local en_EN
Code Example
Here is the function where the error occurs:
voidstartListening() async {
final lang = appDatabase.read('lang');
final localeId = (lang =="fa") ?"fa_IR":"en_EN";
isLoading.value =true;
isListening.value =false;
await speechToText.listen(
onResult: onSpeechResult,
listenFor:constDuration(seconds:10),
localeId: localeId,
cancelOnError:false,
partialResults:false,
listenMode:ListenMode.confirmation,
);
isLoading.value =false;
isListening.value =true;
}
Steps to ReproduceUse the speech_to_text package in a Flutter project.
Set the localeId parameter to fa_IR and call the SpeechToText.listen method on an iOS device.
Observe the error.
EnvironmentFlutter version:3.24.3
speech_to_text version:^6.5.1
iOS version:18Device: simulator - iphone 16OtherNotes:This issue does not occur onAndroid or Web.
The text was updated successfully, but these errors were encountered:
I'm experiencing an issue with the
SpeechToText
package when trying to listen for speech input with the localefa_IR
on iOS. The following exception is thrown:flutter: [ERROR
/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Instance of 'ListenFailedException' #0 SpeechToText.listen (package
/speech_to_text.dart:465:7) #1 ActController.startListening (package
/features/act/presentation/controllers/act_controller.dart:365:5) [ERROR
/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: TimeoutException after 0:00:30.000000: Future not completed
The issue only occurs on iOS with the locale
fa_IR
. It works perfectly fine on Android and Web with the localefa_IR
and work on ios with local en_EN
Code Example
Here is the function where the error occurs:
The text was updated successfully, but these errors were encountered: