TLSphinx icon indicating copy to clipboard operation
TLSphinx copied to clipboard

Return hypothesis before the utterances end

Open BrunoBerisso opened this issue 7 years ago • 2 comments

Explore the possibility of return an hypothesis before the utterance end. This will be useful if trying to find keywords in live speech.

BrunoBerisso avatar Jul 31 '17 14:07 BrunoBerisso

Any idea on how I could go about implementing this? In my app, I want to continuously detect "left" and "right" and get this recognition in real time, as opposed to waiting until the utterance end, which with background noise can take some time. I was able to add the -kws config param so that pocketsphinx only looks for those 2 words (left and right), but it's not in recognizing in real-time. Thanks for any guidance on this.

yosoycody avatar Feb 20 '19 02:02 yosoycody

Hi.

Right now TLSphinx only returns keyboards inside utterances, If you want to avoid this logic you need to update this function https://github.com/tryolabs/TLSphinx/blob/master/TLSphinx/Decoder.swift#L169 to not wait for an utterance to end before returning a hypothesis.

Could you try to open a pull request updating that function? so we can go over your approach looking at the code.

Thanks

BrunoBerisso avatar Feb 25 '19 16:02 BrunoBerisso