Hey Im tryint to use cmusphinx to decode a sound file that since only numbers (numbers not digits) very monotnically but everytime i try a different acoustic model it gives me the error in the picture even if i didnt change the name just the files inside, ive tried so far an adapted version of the en-us and tidigits both fail with the same error.
Removed the line, verbosed image added, and that is the main part of the code, the rest is just determining the file and a bit of error correction but nothing that manipulates the sound detection itself, just a part that appends the audio files to a list so it can be recognised and something that takes the outputed text and corrects it.
r = sr.Recognizer()
with sr.AudioFile(f) as source:
af = r.record(source)
try:
out = r.recognize_sphinx(af)
#print(out)
except sr.UnknownValueError:
print("Sphinx could not understand audio")
out = "and"
except sr.RequestError as e:
print("Sphinx error; {0}".format(e))
You need to remove feature_transform file from the model folder. Try to make sure that only the files of the model on device are matching the files of the model on desktop and it should help you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey Im tryint to use cmusphinx to decode a sound file that since only numbers (numbers not digits) very monotnically but everytime i try a different acoustic model it gives me the error in the picture even if i didnt change the name just the files inside, ive tried so far an adapted version of the en-us and tidigits both fail with the same error.
Last edit: danny banana 2017-03-27
You need to provide the code you tried. You also need to enable verbose logging in order to see more information about the issue, remove the line
in speech_recognition module sources.
Removed the line, verbosed image added, and that is the main part of the code, the rest is just determining the file and a bit of error correction but nothing that manipulates the sound detection itself, just a part that appends the audio files to a list so it can be recognised and something that takes the outputed text and corrects it.
Last edit: danny banana 2017-03-28
You need to remove feature_transform file from the model folder. Try to make sure that only the files of the model on device are matching the files of the model on desktop and it should help you.
i will remove the file once i get home i just didnt understand what you ment by keeping the files on device the same as those on desktop
This solved my problem
https://stackoverflow.com/questions/44339312/new-decoder-returned-1-when-trying-to-run-pocketsphinx-on-raspberry-pi/51346264#51346264