Hi,
steps to reproduce the crash:
Used configuration:
.listen(
onResult: resultListener,
localeId: "sv-SE",
pauseFor: Duration(seconds: 5),
listenOptions: SpeechListenOptions(
listenMode: ListenMode.confirmation,
onDevice: true
cancelOnError: true,
partialResults: true,
autoPunctuation: true,
enableHapticFeedback: true,
),
)
localeId should be a locale that is not set as locale on the device.
It only happens on the first listening attempt after a clean install and only if onDevice = true. After restarting the app it does not crash (sometimes logs an error, but then I can catch it and restart listening with onDevice: false)
The crash that occurs is happening here
if inputNode?.inputFormat(forBus: 0).channelCount == 0 {
throw SpeechToTextError.runtimeError("Not enough available inputs.")
}
Flutter 3.38.7
Tested on iOS Simulator: iPhone 17 Pro, iPad mini (A17 Pro) on iOS 26.2.
Setting it to onDevice: false seems to fix the crash, but then the user looses advantages of onDevice: true..
Is there any workaround or fix for this?
The language used when it crashes is included in the list of speech.locales() somehow (but still crashes).
Hi,
steps to reproduce the crash:
Used configuration:
localeId should be a locale that is not set as locale on the device.
It only happens on the first listening attempt after a clean install and only if onDevice = true. After restarting the app it does not crash (sometimes logs an error, but then I can catch it and restart listening with onDevice: false)
The crash that occurs is happening here
Flutter 3.38.7
Tested on iOS Simulator: iPhone 17 Pro, iPad mini (A17 Pro) on iOS 26.2.
Setting it to onDevice: false seems to fix the crash, but then the user looses advantages of onDevice: true..
Is there any workaround or fix for this?
The language used when it crashes is included in the list of speech.locales() somehow (but still crashes).