Forum Replies Created
Makes sense. No need to open a feature request since I have a workaround.
It’s VLC. Thanks for pointing this out. I guess I should have tested another player in the first place and saved your time. Sorry about that…
So it’s working great, I’m going to use the feature and buy the plugin.
Thank you for taking the time to look into this.
I am using VLC for playback, so that may be the culprit. Let test again and report back, and if still stuck I’m open to sending you the app.
Ok, thank you.
Apparently I just instantiate an AVAudioPlayer. There was some code to set the category on AVAudioSession sharedInstance] but that’s now commented out.
Also note that I’m listening to the files after downloading them back to the mac via iTunes.
I did more testing, and I verify the behavior is identical on devices.
Here is the setup. I tested on an iPhone 5 and iPad 3, both running IOS 6.1.2. I remove all headsets and used the built-in mic.
Truncation occurs on both devices. The symptom is that the last 200 to 500ms are cut out. The input is typically two or three words, and it sounds like the last syllable or so is missing. I tried with longer sentences, and the problem is identical no matter how long the input is. The portion of recording between the start and the truncation sounds fine.
The truncation occurs on each recording and is perfectly reproducible.
This is in an app which opens an audio session for playback only. For these tests, I turned off playback, although the audio session is still opened. I have been testing PocketSphynx for some time in this app with audio playback on with problems.
Aside from being embedded in the app the code is taken directly from the tutorial. It is largely unchanged, except that the model is usually changed between utterances. Whether the model is changed or not does not affect the truncation behavior.
wavWasSavedAtLocation:(NSString *)location doesn’t do anything else then logging the location.
pocketsphinxDidReceiveHypothesis calls a new delegate method which triggers an animation if the recognition is successful. Presumably that happens after the recording is save and does not interfere with the saving of the input.
I tried setting pocketsphinxController.processSpeechLocally = FALSE and interestingly that does not work. wavWasSavedAtLocation does not get invoked anymore, and the log shows a continuous loop of “Pocketsphinx is now listening.” instead of just one when it’s set to true.
Will purchase if we get it to work, let me know if I can provide more info.
Thanks for the explanation – makes sense.
I did a quick test on a device (iPhone 5) and I seem to observe the same behavior on some of the recorded files but not all. This is using a headset with mic to record. I’ll do longer test within a day or two and report back.
Yes, this is in the simulator. I did not have the opportunity to ty on a device yet. Should I expect a different behavior?