
如何解決使用別的聲學模型的時候出現的問題
使用別人訓練好的hmm模型的時候一直報以下錯誤(我這里使用的Communicator_40.cd_cont_4000這個模型)
INFO: acmod.c(242): Parsed model-specific feature parameters from Communicator_4
0.cd_cont_4000/feat.params
ERROR: "fe_interface.c", line 101: FFT: Number of points must be greater or equa
l to frame size (409 samples)
這時候就進入該模型的參數配置文件feat.params中修改參數
-nfft 256 把這條參數改成 -nfft 512 或者直接刪除掉這條就可以用了
不過這參數的用處還沒搞明白
ad_oss.c(103): Failed to open audio device(/dev/dsp): No such file or directory
FATAL_ERROR: "continuous.c", line 242: Failed top open audio device
網上別人說是
(1) Soundrecorder 測試下能否使用
(2) sudo apt-get install libasound2-dev
recompiled sphinxbase
還是沒有任何效果
Can't open audio device /dev/dsp: No such file or directory
解決辦法是加載snd_pcm_oss,即以root身份執行modprobe snd_pcm_oss。
結果執行這句之后提示沒有snd_pcm_oss...網上找了半天發現貌似要裝alsa-driver
http://www.alsa-project.org/main/index.php/Main_Page
裝上去了,又然后再執行,再提示我
WARNING: Error inserting snd_page_alloc (/lib/modules/3.2.0-26-generic-pae/kernel/sound/acore/snd-page-alloc.ko): Operation not permitted
WARNING: Error inserting snd_timer (/lib/modules/3.2.0-26-generic-pae/kernel/sound/acore/snd-timer.ko): Operation not permitted
WARNING: Error inserting snd_pcm (/lib/modules/3.2.0-26-generic-pae/kernel/sound/acore/snd-pcm.ko): Operation not permitted
FATAL: Error inserting snd_pcm_oss (/lib/modules/3.2.0-26-generic-pae/kernel/sound/acore/oss/snd-pcm-oss.ko): Operation not permitted
我去啊。。。OTZ,然后發現我少裝了alsa-util
各種依賴包。。。第一次用linux,完全不懂怎么找依賴包啊
幸好還有人寫了怎么裝alsa-util。。。
http://www.linuxeden.com/html/hardware/20091220/69686.html
http://ceeji.net/blog/fix-ubuntu-sound/zh-hans/
麥克風不能用的解決方法
Open terminal and paste "sudo gedit /etc/modprobe.d/alsa-base.conf", hit Enter. It will open a file alsa-base.conf. scroll to the end of the file and add the this "options snd-hda-intel position_fix=1" as a new line, save the file and reboot. Enjoy this!
// 找到一個辦法,添加 "options snd-hda-intel position_fix=1 enable=yes" 到文件
// /etc/modprobe.d/alsa-base.conf 中(sudo gedit /etc/modprobe.d/alsa-base.conf)
然后還有一點,千萬要確認你的麥克風是好的。。。搞了一下午,始終沒法讓麥發出聲音,然后進了windows測麥克風發現,麥克風不能識別。。。thinkpad的耳麥,用專用的擴展孔也不好用啊。。。坑爹
然后我的dic文件是靠http://www.speech.cs.cmu.edu/tools/lmtool.html這個網站在線做出來的
然后發現有些單詞的發音會很奇怪。。。可能有些還需要自己稍微修改下
lm語言模型還沒搞清楚他的意義。。。也是上面的地址、在線做出來的、不過里面的gram也不知道做什么的
grammar嗎?