-
Notifications
You must be signed in to change notification settings - Fork 238
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: When audio is used by another app, STT stops working, but "SpeechRecognitionError" shows no errors and "isListening" shows true #470
Comments
Actually STT still working for your app audio(which it stopped) but it is isolated from device sound(other app's audio). Unfortunately, it is not a trivial task to get access to the system sound output (which is probably a good thing, from a security standpoint). The solutions will generally involve setting up a 'fake' audio device that audio can get played through instead of the default output device you've chosen, and you need "Method channel" for that (Not Flutter) But if you just want to detect "isListening," you can handle audio interruptions separately |
Came from Upwork :) For overriding the default settings for the audio services for iPhone as I have worked with this in past and working fine? My usecase was to record the sound from mic when video is playing. (Recording the voiceover) |
If you add a step 6 and bring the STT app back to the foreground does the active listening session still work? Or does it only work once a new listening session is started? |
I think it only works once we kill STT and then start a new listening session, but the problem is that we cannot even restart it because we don't know if the speech STT stopped listening or is still active. Because there are no errors. However we found a trick with looking at invokeFlutter: soundlevel change |
Thanks for the clarification. I'll have a look at detecting that error. Hopefully doable. |
@Kaival-Patel my use case is same to yours like I want to use speech to text in iOS while running music but starting speechtotext effect on music and when I try to stop speech to text it also stops the music I am using just_audio ignorer to play the music |
Steps to reproduce
Note: if you skip steps 3&4, result will be same
Expected:
Actual result
SpeechRecognitionError will show no errors
isListening status shows "True"
Example screenshot in Xcode: https://share.cleanshot.com/wYNyM1qs
Environment: iPhone 15, iOS 17
speech_to_text version: latest
What I tried to do: researched 20+ topics and issues regarding continuous use like this but didn't find anything that solves my usecase
I'm not very technical, but If anyone has dealt with this before and could help - would love to pay. My email is kodjima33@gmail.com and telegram is @kodjima33
The text was updated successfully, but these errors were encountered: