Describe the bug
I have integrated the google_speech package correctly, and it works fine on Android. However, when I run the iOS app and click on the mic button to start transcription, the app crashes immediately with the following error in Xcode:
Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: IsFormatSampleRateAndChannelCountValid(format)'
First throw call stack:
(0x199628f20 0x1914e2018 0x19972766c 0x1b31a0198 0x1b3202714 0x1b327c08c 0x1021ed37c 0x1021edc7c 0x1021eaac4 0x1021eb110 0x105521630 0x104f7d644 0x1022fcb98 0x1022fe7bc 0x10230ed58 0x10230e90c 0x1995fb710 0x1995f8914 0x1995f7cd8 0x1de4a81a8 0x19bc3090c 0x19bce49d0 0x100d9c918 0x1bcca9e4c)
libc++abi: terminating due to uncaught exception of type NSException
AVAEInternal.h:76 required condition is false: [AVAEGraphNode.mm:832:CreateRecordingTap: (IsFormatSampleRateAndChannelCountValid(format))]
I have tried different sample rates (16000, 44100, etc.), but none of them worked. The issue persists on a real device (iPhone SE 2020).
To Reproduce
Steps to reproduce the behavior:
1 ) Integrate the google_speech package in a Flutter app.
2 ) Configure the sample rate and other necessary settings.
3 ) Run the app on an iOS device.
4 ) Click on the mic button to start transcription.
5 ) Observe the app crash and the error in Xcode.
Expected behavior
The app should start the transcription process without crashing.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Device: iPhone SE 2020
OS: 17.5.1
Browser: N/A
Version : N/A
Additional context
The issue does not occur on Android; it works fine on Android devices. The problem is specific to iOS.
Describe the bug I have integrated the google_speech package correctly, and it works fine on Android. However, when I run the iOS app and click on the mic button to start transcription, the app crashes immediately with the following error in Xcode:
Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: IsFormatSampleRateAndChannelCountValid(format)' First throw call stack: (0x199628f20 0x1914e2018 0x19972766c 0x1b31a0198 0x1b3202714 0x1b327c08c 0x1021ed37c 0x1021edc7c 0x1021eaac4 0x1021eb110 0x105521630 0x104f7d644 0x1022fcb98 0x1022fe7bc 0x10230ed58 0x10230e90c 0x1995fb710 0x1995f8914 0x1995f7cd8 0x1de4a81a8 0x19bc3090c 0x19bce49d0 0x100d9c918 0x1bcca9e4c) libc++abi: terminating due to uncaught exception of type NSException AVAEInternal.h:76 required condition is false: [AVAEGraphNode.mm:832:CreateRecordingTap: (IsFormatSampleRateAndChannelCountValid(format))]
I have tried different sample rates (16000, 44100, etc.), but none of them worked. The issue persists on a real device (iPhone SE 2020).
To Reproduce Steps to reproduce the behavior:
1 ) Integrate the google_speech package in a Flutter app. 2 ) Configure the sample rate and other necessary settings. 3 ) Run the app on an iOS device. 4 ) Click on the mic button to start transcription. 5 ) Observe the app crash and the error in Xcode.
Expected behavior The app should start the transcription process without crashing.
Screenshots If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context The issue does not occur on Android; it works fine on Android devices. The problem is specific to iOS.