Hi,
I've been trying to use pocketsphinx on ios (tried iphone and simulator). Compiled using the provided build_iphone.sh and linked statically. Attempt to recognize speech does not produce any output on ios. I converted the raw-file written by pocketsphinx in the process to .wav and fed it to pocketsphinx_continuous (from the same compilation) with exactly the same parameters, and it works there. What could I be missing?
For some reason the number of words, senones (etc) evaluated for ios is considerably lower than that of continuous and I wonder if that is the reason for not recognising anything on ios.
Following is the output of pocketsphinx_continuous and ios (below)
You corrupted the raw data you feed into decoder in ios, like endian is wrong or something like that. Without seeing your code it is hard to help you there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your quick response Nickolay! The data that I feed into pocketsphinx_continuous is actually the one that is logged by ios pocketsphinx (in rawlogdir). Does that not mean that the data input-format is correct? I also played the same in Audacity and it sounds fine.
Turned out that the input format (32-bit-float) was indeed wrong. Audacity was able to import and export to wav, but when I added the header myself it did not work. Changed to 16-bit-signed and it works. Thanks for your inputs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've been trying to use pocketsphinx on ios (tried iphone and simulator). Compiled using the provided build_iphone.sh and linked statically. Attempt to recognize speech does not produce any output on ios. I converted the raw-file written by pocketsphinx in the process to .wav and fed it to pocketsphinx_continuous (from the same compilation) with exactly the same parameters, and it works there. What could I be missing?
For some reason the number of words, senones (etc) evaluated for ios is considerably lower than that of continuous and I wonder if that is the reason for not recognising anything on ios.
Following is the output of pocketsphinx_continuous and ios (below)
On ios simulator -
You corrupted the raw data you feed into decoder in ios, like endian is wrong or something like that. Without seeing your code it is hard to help you there.
Thanks for your quick response Nickolay! The data that I feed into pocketsphinx_continuous is actually the one that is logged by ios pocketsphinx (in rawlogdir). Does that not mean that the data input-format is correct? I also played the same in Audacity and it sounds fine.
In code, I am initializing as follows -
after initializing the decoder I am reading the data in chunks of 2048 bytes and calling -
in a loop.
At the end
My guess was that some initialization part is amiss.
Last edit: A darsh 2016-06-09
You need to provide a complete code, not just a couple of lines.
Turned out that the input format (32-bit-float) was indeed wrong. Audacity was able to import and export to wav, but when I added the header myself it did not work. Changed to 16-bit-signed and it works. Thanks for your inputs.