khanhuitse05 / speech-and-text-unity-ios-android

Speed to text in Unity iOS use Native Speech Recognition
MIT License
297 stars 126 forks source link

Audio only through headphones after starting recording session in iOS. #7

Closed GuhaneshSakha closed 4 years ago

GuhaneshSakha commented 6 years ago

After starting and stopping audio session in iOS, the unity audio gets muted in iPhone internal speakers but if I connect headphones I can hear audio

khanhuitse05 commented 4 years ago

Thanks for your feedback. I not sure It's your bug, because I don't have headphones. If you still work on this package, let double check it. -> the issue is when we start to Speak when pre turn is not finished. => the line code don't work correctly if([speechSynthesizer isSpeaking]) -> To fix: add one more line on StartSpeak() function in SpeechUtteranceViewController.mm
if([speechSynthesizer isSpeaking] == false) {