I finally set up node-pocketsphinx and I was hoping I could use this to get phonemes with timestamps.
I looked around, and it seems you need to set -allphone to the phone path. Then you need to use decoder.seg(), which is meant to return phonemes and timestamps. However, I tried using decoder.seg(), and it always returned nothing. I think this was because it got called before the decoder finished, so I tried wrapping everything in a promise, but this got called early as well.
Then I re-read the code posted on that question, and I realised he never even set -allphone, yet it still appears to return phonemes. What is the advantage of setting -allphone if it returns phonemes either way? EDIT: it doesn't work unless you use -allphone
_exports_Hypothesis{prob:0,bestScore:-5813,hypstr:'SIL T OW F AO ER T AE NG IY D ER S SIL'}SIL045T4651OW5263F6478AO7993ER94113T114130AE131139NG140156IY157169D170172ER173190S191211SIL212260
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I finally set up node-pocketsphinx and I was hoping I could use this to get phonemes with timestamps.
I looked around, and it seems you need to set -allphone to the phone path.
Then you need to use decoder.seg(), which is meant to return phonemes and timestamps. However, I tried using decoder.seg(), and it always returned nothing. I think this was because it got called before the decoder finished, so I tried wrapping everything in a promise, but this got called early as well.
Then I re-read the code posted on that question, and I realised he never even set -allphone, yet it still appears to return phonemes. What is the advantage of setting -allphone if it returns phonemes either way? EDIT: it doesn't work unless you use -allphone
Then I read that you could align timestamps using the alignment API. This confused me even more, because I thought that decoder.seg() already did that.
I'm probably just stupid but I'm a bit lost as to what to do, and the difference between things.
This is the current code, based on the python phoneme example:
It works, but with no timestamps. It'd be fantastic if someone could tell me what I should do.
Last edit: MysteryPancake 2018-01-29
This code outputs timestamps:
Thank you so much!
Last edit: MysteryPancake 2018-01-30