Speech to text sdk freezes after video playback

2020-03-08 00:00发布

问题:

I'm using speech-to-text sdk provided by https://github.com/todoroo/iPhone-Speech-To-Text

Recognizer works just fine until the moment I playback a video using MPMoviePlayerController. Here is the code i'm using to call recognizer:

- (IBAction)actionBtRecognition:(id)sender {
    if(recognizer == nil){
       recognizer = [[SpeechToTextModule alloc] init];
    }
    [recognizer beginRecording];
}

To playback movie I used this tutorial

So, once I playback a movie and call recognizer, it's just freezes. When I debug sdk source code, I was found that my voice is not recording. Variable meterStateDB.mAveragePower is always = -120

Note that on my Mac iphone simulators all works perfect! But on real device (iphone 4, ios 5.1.1) happens the problem I described above. Maybe this is only my device problem?

I would be very grateful if someone will check the same thing on his own device.