Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS App Crashes when it detects the speech #372

Closed
vasanthbalaji88 opened this issue Mar 3, 2023 · 8 comments
Closed

IOS App Crashes when it detects the speech #372

vasanthbalaji88 opened this issue Mar 3, 2023 · 8 comments
Labels
bug Something isn't working iOS

Comments

@vasanthbalaji88
Copy link

[avae] AVAEInternal.h:76 required condition is false: [AVAEGraphNode.mm:826:CreateRecordingTap: (nullptr == Tap())]
*** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: nullptr == Tap()'

Im always getting error , when i speak something and when it detects ,it crashes the app

@sowens-csd
Copy link
Contributor

What iOS version and device are you using?

@sowens-csd sowens-csd added bug Something isn't working iOS labels Mar 3, 2023
@vasanthbalaji88
Copy link
Author

@sowens-csd
IOS version is 16.2 and device is Iphone Xr

@sowens-csd
Copy link
Contributor

Does it do this in the example app? Do you have any bluetooth or wired headphones connected?

@vasanthbalaji88
Copy link
Author

I haven't tried with example app, but i didn't connect any bluetooth Or wired headphones. But i copied the contents from example app for speech recognition.

@sowens-csd
Copy link
Contributor

Thanks, I have the same phone and iOS 16.3.1 and cannot reproduce the problem. I can successfully recognize text in the example app. Are you using any other plugins in your app or is it just the standard example app?

I'll try some searches on the error log and see if I can find any likely causes.

@sowens-csd
Copy link
Contributor

This looks like it might be related:
https://developer.apple.com/forums/thread/51935

The cause seems to be adding a tap without removing an existing tap first. Can you get the failure on the first attempt to listen for voice or does it only happen on subsequent attempts? Are there any other speech, voice, or sound plugins in use in the app? My theory is that something (either STT itself or some other plugin) is tapping the input bus to listen and then not removing the tap before STT next tries to start listening. Since I can't reproduce the problem there might be something about how you're using it that is different from what I'm doing. Can you give me any reproduction steps that might help?

@vasanthbalaji88
Copy link
Author

vasanthbalaji88 commented Mar 9, 2023

@sowens-csd
I checked the link you sent, yes im using another plugin https://pub.dev/packages/tflite_audio for audio recognition,

first i use tflite audio to recognise audio ,i stop the audio recognition, once it recognises,i start the speech recognition to be listened after audio recognition is stopped, when speech recognition detects the text , i was stopping the speech recognition and start audio recognition(this is stream based audio recognition).

i think this was running in parallely and caused the iOS app crash, now i delayed for some milliseconds and started the audio recognition after stopping speech(so this might be removed the tap by delaying) , it seems to be fine now.

Thanks for your Responses and quick replies , this is great plugin for speech to text. Could you please add this information for other users, who might face this issue now or in future, they should delay some milliseconds to work both packages, they shouldnt be run in parallel.

@sowens-csd
Copy link
Contributor

Thanks for posting your solution, that's really helpful. Yes, I'll add this to the troubleshooting section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working iOS
Projects
None yet
Development

No branches or pull requests

2 participants