PocketSphinx is running on my Raspberry Pi 3 running Raspbian Jessie, using a .dic and .lm generated by the lmtool-new,html link.
While PocketSphinx recognizes 100% of the words/phrases from that processed sentence corpus output set, it spends far more time telling me "input overrun, read calls are too rare (non-fatal)", and far too little time "Listening..."
I seem to ONLY be able to give it a -samprate of 44100 - here's my command line to start Sphinx:
If I try a different samprate, it gives me an error about only "available rate of 44100 is too far from requested <whatever>", such as 16000, etc...</whatever>
So it seems to work fine - when it works. I just need to help it not get input overruns, and I'm not sure what I should be adjusting if I can't adjust the samprate.
I'm using a USB Sound Card. Output of PS is shown below if that is helpful in determining the issue here. You can see the properly-heard phrases I tested in this quick run (RUN PROGRAM, RUN MODULE, BRING YOURSELF BACK ONLINE) displayed in the code output below.
You are correct, however, it was a month ago, and the single answer given was from someone who referenced information that was out of date given the advance in the hardware I am using.
I believe it is reaonable then to redescribe the information (as I have above) such that the question is not viewed as "can Sphinx run on the Pi", but rather, what changes must be made to allow the software to run better without triggering the Input Overrun message, or, optionally, what parameter makes it so that the only sample rate is 44100 and cannot be set to 16000, which I suspect is the root of the issue.
I believe that there are a great many smart folks on here who could answer one or both of those two questions easily, but may not have seen that the answer given was sub-optimal. I have been tuning that command line myself and have gotten much better performance, so Sphinx is definitely running on my R Pi 3, and I believe it can run very well if I understand how to adjust the parameters creating the Overrun message.
Thanks for your understanding and patience.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
-ds, -topn, -maxhmmpf and -pl_window. While some adjustments have reduced the Input Overrun errors, the accuracy has suffered. While PocketSphinx is technically running with a custom -dict and -lm, and high accuracy on the items in my -dict, the time it spends actually listening seems very low. I know there's sharp folks out here, I'm really hoping you can be helpful. If I could justify the cost of a Jetson TX2, I would gladly make the switch, as speech recognition is a key component of my goals here, but I also figure if I can tune PocketSphinx to run reasonably on the Raspberry Pi 3... I should be able to get it to run on almost anthing that follows and has better power. An honest plea for your best ideas here friends.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are correct, however, it was a month ago, and the single answer given was from someone who referenced information that was out of date given the advance in the hardware I am using.
Please try to understand the information in answers before making conclusions.
An honest plea for your best ideas here friends.
You can profile your system with something like oprofile, not sure if it is supported. Most likely it spends a lot of time in FFT, not in speech recognition. 44.1 khz and 2048 fft is a bit overkill for Pi3.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just saw this, thanks. I agree that 44.1/2048 is MUCH more resolution than I believe I need. I am looking for a USB sound card that can support 16k, unfortunately without much luck so far. I will look into oprofile and post anything useful, thank you. Here's a video of a guy running PocketSphinx on a R Pi 3 and comparing it to the slow performance of an R Pi 2... I will be contacting him after downloading all of his code at github and see what I need to be doing differently. I have only a few time windows to get this stuff accomplished unfortunately... :) Check this guy's video, it's impressive:
PocketSphinx is running on my Raspberry Pi 3 running Raspbian Jessie, using a .dic and .lm generated by the lmtool-new,html link.
While PocketSphinx recognizes 100% of the words/phrases from that processed sentence corpus output set, it spends far more time telling me "input overrun, read calls are too rare (non-fatal)", and far too little time "Listening..."
I seem to ONLY be able to give it a -samprate of 44100 - here's my command line to start Sphinx:
If I try a different samprate, it gives me an error about only "available rate of 44100 is too far from requested <whatever>", such as 16000, etc...</whatever>
So it seems to work fine - when it works. I just need to help it not get input overruns, and I'm not sure what I should be adjusting if I can't adjust the samprate.
I'm using a USB Sound Card. Output of PS is shown below if that is helpful in determining the issue here. You can see the properly-heard phrases I tested in this quick run (RUN PROGRAM, RUN MODULE, BRING YOURSELF BACK ONLINE) displayed in the code output below.
Thank you.
You already asked this question at
https://sourceforge.net/p/cmusphinx/discussion/help/thread/0ed128a5/
You are correct, however, it was a month ago, and the single answer given was from someone who referenced information that was out of date given the advance in the hardware I am using.
I believe it is reaonable then to redescribe the information (as I have above) such that the question is not viewed as "can Sphinx run on the Pi", but rather, what changes must be made to allow the software to run better without triggering the Input Overrun message, or, optionally, what parameter makes it so that the only sample rate is 44100 and cannot be set to 16000, which I suspect is the root of the issue.
I believe that there are a great many smart folks on here who could answer one or both of those two questions easily, but may not have seen that the answer given was sub-optimal. I have been tuning that command line myself and have gotten much better performance, so Sphinx is definitely running on my R Pi 3, and I believe it can run very well if I understand how to adjust the parameters creating the Overrun message.
Thanks for your understanding and patience.
UPDATE:
I have been adjusting the following parameters:
-ds, -topn, -maxhmmpf and -pl_window. While some adjustments have reduced the Input Overrun errors, the accuracy has suffered. While PocketSphinx is technically running with a custom -dict and -lm, and high accuracy on the items in my -dict, the time it spends actually listening seems very low. I know there's sharp folks out here, I'm really hoping you can be helpful. If I could justify the cost of a Jetson TX2, I would gladly make the switch, as speech recognition is a key component of my goals here, but I also figure if I can tune PocketSphinx to run reasonably on the Raspberry Pi 3... I should be able to get it to run on almost anthing that follows and has better power. An honest plea for your best ideas here friends.
Please try to understand the information in answers before making conclusions.
You can profile your system with something like oprofile, not sure if it is supported. Most likely it spends a lot of time in FFT, not in speech recognition. 44.1 khz and 2048 fft is a bit overkill for Pi3.
Just saw this, thanks. I agree that 44.1/2048 is MUCH more resolution than I believe I need. I am looking for a USB sound card that can support 16k, unfortunately without much luck so far. I will look into oprofile and post anything useful, thank you. Here's a video of a guy running PocketSphinx on a R Pi 3 and comparing it to the slow performance of an R Pi 2... I will be contacting him after downloading all of his code at github and see what I need to be doing differently. I have only a few time windows to get this stuff accomplished unfortunately... :) Check this guy's video, it's impressive:
https://vimeo.com/169445418
Thanks again.
Last edit: David Xanatos 2017-05-03