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

frontend.util.Microphone needs to clean up before (re)starting recording #82

Open
timobaumann opened this issue Apr 13, 2018 · 0 comments

Comments

@timobaumann
Copy link
Contributor

frontend.util.Microphone does not clean its queue of data objects to be output when (re)starting recording.

When using that Microphone DataSource with endpointing, recognition may stop after SpeechEndSignal and leaves data objects in the queue when I then call stopRecording(). In particular, the old DataEndSignal is still there (before a new DataStartSignal appears followed by the new audio once recording resumes). The old DataEndSignal breaks recognition (or maybe already VAD?) even before the new data can be processed further down the pipeline.

The fix is to add

audioList.clear();

somewhere around line 444 (i.e., before creating the new recordingThread or before starting it). I'm happy to provide such a fix.

On another note: I filed this as https://sourceforge.net/p/cmusphinx/bugs/482/ but I'm unsure which of the bug trackers is currently used, so re-filing.

@timobaumann timobaumann changed the title frontend.uitil.Microphone needs to clean up before (re)starting recording frontend.util.Microphone needs to clean up before (re)starting recording Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant