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

Conflict between microphone and speaker on the IOS device. #61

Closed
igor-nm opened this issue Feb 26, 2018 · 10 comments
Closed

Conflict between microphone and speaker on the IOS device. #61

igor-nm opened this issue Feb 26, 2018 · 10 comments

Comments

@igor-nm
Copy link

igor-nm commented Feb 26, 2018

In IOS when permission is granted to the microphone, the device's audio goes to the upper speaker and the sound becomes low because that speaker serves for the purpose of call. Please, anybody can help me?

@rodrigosol
Copy link

Same problem here!

@dalinarkholin
Copy link

dalinarkholin commented Mar 1, 2018

@ak1394 @wenkesj I am seeing this as well. When playing audio, and simply running Voice.start() (from react-native-voice) , the phone ear speaker is used instead of the body speakers. I don't think this was happening a couple weeks ago. I think there might have been a ios change. Any ideas?

I am running IOS 11.2.5

Not sure where we want to keep this thread. Also have a comment here: react-native-voice/voice#75

Issue could have something to do with the new HomePod support they built in?
https://support.apple.com/en-us/HT208067

For my case, I don't actually need both the audio and voice recognition to be happening at the sametime. If we introduced promises(await async) to this module that might solve the issue. That way I can wait on tts.speak(someString) to finish before enabling the microphone via Voice.start().

Thoughts?

@ak1394
Copy link
Owner

ak1394 commented Mar 2, 2018

Guys, I'm not sure I can be much of help here, this seems like IOS issue? As of returning promises from speak(), for now you should be able to use events to wait for it to finish speaking. I have to document it but speak() returns an utteranceId and if you subscribe with Tts.addEventListener('tts-finish', (event) => console.log("finish", event)); you'll see the same id in the event as well.

@dalinarkholin
Copy link

Thanks @ak1394. That was helpful! Moving this conversation back over to react-native-voice for now.

@igor-nm
Copy link
Author

igor-nm commented Mar 7, 2018

Hi guys, everything fine?
I would like to thank you guys for looking at this problem, do you guys think we can find a solution to this, or is it really an iOS problem?
I do ever not developing in Objective-C so I can not help them much with this.
Sorry me. :(

@igor-nm
Copy link
Author

igor-nm commented Mar 13, 2018

This problem was resolved that topic: react-native-voice/voice#75
The solution was found pelo @dalinarkholin, and I already asked him if can release pull request.
Thank's everyone.

@igor-nm igor-nm closed this as completed Mar 13, 2018
@jferas
Copy link

jferas commented Aug 30, 2018

Were a pull requests ever done for tts and voice related to this issue? Looking at the commit logs I don't see it. If not, I'll do it, because the fork belonging to @dalinarkholin is not rn 0.56 compatible and I want to get this fix into an app that I'm working on. This issue caught be by surprise because I was testing in iPad and didn't see it (no ear speaker) and gave the app to a friend and he noticed on his iPhone.

@dalinarkholin
Copy link

@jferas It was never merged. I didn't feel comfortable with the solution and Im pretty sure it could be resolved just on the react-native-voice package. You can see my solution in my commits here:
https://github.com/dalinarkholin/react-native-voice/commits/master

@jferas
Copy link

jferas commented Sep 6, 2018

@dalinarkholin Thanks!.. I saw your commits in react-native-voice and re-did them in a fork/branch from master that had the react native 0.56 support in it. Seems to be working fine in my app, so I did a pull request for it over in react-native-voice. Thanks for doing original legwork! Strange that we're posting about it here in react-native-tts but this is where the problem surfaced, and of course where I first went when I noticed it.

@under94
Copy link

under94 commented Dec 6, 2018

#104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants