唤醒词 唤醒词模型生成 snowboy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
1.9 KiB

3 years ago
  1. # README
  2. ## 1.虚拟机使用说明
  3. ```
  4. 账号:zwsd
  5. 密码:zwsd
  6. 功能:构造snowboy唤醒模型
  7. ```
  8. ## 2.如何构建模型
  9. 1.打开虚拟机,并打开终端
  10. 2.切换目录到/home/zwsd/Desktop/snowboy
  11. ```bash
  12. cd /home/zwsd/Desktop/snowboy
  13. ```
  14. 3.依次执行下面指令
  15. ```bash
  16. virtualenv -p python2 venv/snowboy
  17. source venv/snowboy/bin/activate
  18. cd examples/Python
  19. ```
  20. 4.将录音文件拷贝到当前目录下
  21. ![image-20220330104544094](markdown.assets/README.assets/image-20220330104544094.png)
  22. ```
  23. Tip:
  24. ssh sftp 均已打开,通过FileZilla直接传输文件即可
  25. ```
  26. 5.执行下面指令生成模型
  27. ````
  28. python generate_pmdl.py -r1=record1.wav -r2=record2.wav -r3=record3.wav -lang=cn -n=hotword.pmdl
  29. ```
  30. 执行结束后会在当前目录下产生hotword.pmdl
  31. ```
  32. ````
  33. ## 3.如何测试模型
  34. ```
  35. cd /home/zwsd/Desktop/snowboy/examples/C
  36. make
  37. ./demo
  38. =========================日志说明=====================
  39. -2 detected!
  40. -2 detected!
  41. -2 detected!
  42. -2 detected! 静默语音
  43. 0 detected! 有声音
  44. 0 detected!
  45. 0 detected!
  46. 0 detected!
  47. 1 detected! 识别到唤醒词
  48. -2 detected!
  49. -2 detected!
  50. -2 detected!
  51. -2 detected!
  52. ```
  53. 通过修改下面代码决定使用哪个模型。
  54. ![image-20220330105913510](markdown.assets/README.assets/image-20220330105913510.png)
  55. ## 4.常见问题
  56. 1.如果感觉MIC电脑MIC有问题,录不到音.
  57. ```
  58. 原因一:ubuntu系统配置问题
  59. 1. 打开音频配置。
  60. 2. 注意mic是否被设置静音了。
  61. ```
  62. ![image-20220330110034442](markdown.assets/README.assets/image-20220330110034442.png)
  63. ![image-20220330110156442](markdown.assets/README.assets/image-20220330110156442.png)
  64. ```
  65. 原因二:虚拟机配置问题
  66. 查看虚拟机右下角状态栏中的小喇叭是否被点亮。
  67. ```
  68. ![image-20220330110301977](markdown.assets/README.assets/image-20220330110301977.png)
  69. ```
  70. 原因三: 查看windows MIC 是否正常工作
  71. ```