GithubHelp home page GithubHelp logo

iOS: When audio is used by another app, STT stops working, but "SpeechRecognitionError" shows no errors and "isListening" shows true about speech_to_text HOT 6 OPEN

kodjima33 avatar kodjima33 commented on September 17, 2024
iOS: When audio is used by another app, STT stops working, but "SpeechRecognitionError" shows no errors and "isListening" shows true

from speech_to_text.

Comments (6)

OmAr-Kader avatar OmAr-Kader commented on September 17, 2024

Upwork

Actually STT still working for your app audio(which it stopped) but it is isolated from device sound(other app's audio).

developer.apple

Screenshot 2024-01-02 073013

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

from speech_to_text.

Kaival-Patel avatar Kaival-Patel commented on September 17, 2024

Came from Upwork :)
Have you tried this package
https://pub.dev/packages/audio_service

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)

from speech_to_text.

sowens-csd avatar sowens-csd commented on September 17, 2024

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?

from speech_to_text.

kodjima33 avatar kodjima33 commented on September 17, 2024

@sowens-csd

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

from speech_to_text.

sowens-csd avatar sowens-csd commented on September 17, 2024

Thanks for the clarification. I'll have a look at detecting that error. Hopefully doable.

from speech_to_text.

hassanrazzaq8 avatar hassanrazzaq8 commented on September 17, 2024

@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
@sowens-csd

from speech_to_text.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.