mzeeshanid / iOS-Speech-To-Text

This library use the Google Voice API and the Speex audio codec for speech-to-text on iOS
GNU General Public License v2.0
55 stars 23 forks source link

Playback volume problem #1

Open jinseokoh opened 10 years ago

jinseokoh commented 10 years ago

noticed one problem after I tried to run your code.

Voice recognition works great. but then, audio playback doesn't work properly once i instantiated SpeechToTextModule class. I suspect the speex codec has a bug to turn iPhone's playback volume down to the minimal (or unhearable) level.

I've used the following function to test this out.

- (void)playSoundEffect
{
    NSURL *soundURL = [[NSBundle mainBundle] URLForResource:@"beep" withExtension:@"aif"];

    SystemSoundID soundEffect;

    AudioServicesCreateSystemSoundID((__bridge CFURLRef)soundURL, &soundEffect);

    AudioServicesPlaySystemSound(soundEffect);
}

I called this function before and after instantiating the SpeechToTextModule class twice. and, noticed the difference. I wonder if there's any way to turn the playback volume up. So far nothing worked.

Thanks!

Chuck