syl22-00 / pocketsphinx.js

Speech recognition in JavaScript and WebAssembly
1.49k stars 261 forks source link

Is returned hyp data a evergrowing string? #53

Open novice79 opened 8 years ago

novice79 commented 8 years ago

forgive for my newbie question. I tried live_zh.html demo, this: if (e.data.hasOwnProperty('hyp')) { var newHyp = e.data.hyp; ... be called about 1time/sec, and return a evergrowing hyp_string. Is there memory issue for longterm run(says hours or days)? how do I get just recently recognized keyword.

syl22-00 commented 8 years ago

I don't see why you'd have the recognizer listen for hours. In general people recognize long audio after having cut them into smaller chunks. And especially for pocketsphinx.js, in the browser, I don't see why you'd need to listen for hours.

But still to answer your question, yes, the hypothesis is kept in memory, but even for a few hours, it's not that big.

novice79 commented 8 years ago

thank you for your answer. because I want to make a televox game, the character in the virtual game world controlled by voice command, you say 'run' it run, 'turn left' it does what you say. I mean a voice controlling mmorpg may need this long time run ability. I will try to restart reognizing intermittently