Closed amateur-RD closed 6 years ago
Yes, sure, you can use models from downloads:
https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/Mandarin/
OK, I have downloaded the language models for Mandarin, but I don't know how to use it to achieve Chinese speech recongnition. And could you please give me some to tutorial? Thanks! @nshmyrev
You can follow the tutorial provided here: https://github.com/Pankaj-Baranwal/cmu-pocketsphinx/wiki/Demo:-Kws-mode As mentioned in the link provided, you simply need to add an argument: hmm with its value being the absolute location of your acoustic model.
Ok,thank you very much! I add args hmm、dict and lm with its value being the absolute location in launch file followed the tutorial. When I run command roslaunch
, the output INFO is INFO: acmod.c(246): Parsed model-specific feature parameters from /usr/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k/feat.params
. However, the arg hmm absolute location value is /usr/share/pocketsphinx/model/hmm/zh/tdt_sc_8k
.
And I run command roslaunch pocketsphinx ... hmm:=/usr/share/pocketsphinx/model/hmm/zh/tdt_sc_8k
, the output INFO still is ../hmm/en_US/hub4wsj_sc_8k/..
. So it doesn't read the arg hmm value. I want to know the reason and how to use myself acoustic model and dictionary.
In addition, when I run command pocketsphinx_continuous -hmm ~/Desktop/xiaoyou/tdt_sc_8k -lm ~/Desktop/xiaoyou/robocup.lm -dict ~/Desktop/xiaoyou/robocup.dic
, it can recognize the keyword that I write in dictionary. thanks!
Could you share the exact command you are using?
Sure! Three args hmm、lm and dict has been defined in the robocup.launch file. I run 1 and 2 command, the output INFO shows it still doesn't read the arg hmm、lm and dict absolute location value.
1.roslaunch pocketsphinx robocup.launch
2.roslaunch pocketsphinx robocup.launch hmm:=/usr/share/pocketsphinx/model/hmm/zh/tdt_sc_8k lm:=~/Desktop/xiaoyou/robocup.lm dict:=~/Desktop/xiaoyou/robocup.dic
3.pocketsphinx_continuous -hmm ~/Desktop/xiaoyou/tdt_sc_8k -lm ~/Desktop/xiaoyou/robocup.lm -dict ~/Desktop/xiaoyou/robocup.dic
@amateur-RD You can not use ~ symbol in ros, it is expanded only in bash. Use full absolute path.
Well, robocup.launch was used in Mike Ferguson's version. It was developed back in 2011. It is recommended that you make use of the up-to-date changes for best results. You can find detailed instructions of how to use it here as well as in the blog post. If you would like to stick to the old version, then unfortunately, there is not easy way to solve your problem without modifying the code. You'd need to do the following:
And Nikolay is right. You need to use absolute file paths.
If you are using Ubuntu, replace ~/Desktop/... with /home/
Does it support Chinese speech recognition? If not, and how to support Chinese speech recognition? Thanks!