英特尔爱迪生语音控制 - 如何配置alsa


2

我想用英特尔爱迪生实现一个语音控制的轮椅。基本上我会说前进,左,右和停止通过连接到爱迪生板的麦克风 声音适配器

对于初始原型,我只想将语音识别的输出显示给CLI。

我跟着 这个 在线教程。一切都很好,直到声音配置部分。

接下来是教程中使用的命令的CLI输出。

的lsusb:

root@edison:/home/speech_to_text# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

ALSA-utils的:

root@edison:/home/speech_to_text# opkg install alsa-utils libportaudio2 libasound2 bison espeak alsa-lib-dev alsa-utils-dev alsa-dev python-numpy
Package alsa-utils (1.0.28-r0) installed in root is up to date.
Package libportaudio2 (v19+svnr1387-r0) installed in root is up to date.
Package libasound2 (1.0.28-r0) installed in root is up to date.
Package bison (2.7.1-r0) installed in root is up to date.
Package espeak (1.48.04-r0) installed in root is up to date.
Package alsa-lib-dev (1.0.28-r0) installed in root is up to date.
Package alsa-utils-dev (1.0.28-r0) installed in root is up to date.
Package alsa-lib-dev (1.0.28-r0) installed in root is up to date.
Package python-numpy (1.7.0-r1) installed in root is up to date.

aplay :(在这里给出错误)

root@edison:/home/speech_to_text# aplay -Ll
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:1697:(snd_config_load1) _toplevel_:1:29:Unexpected char
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:3417:(config_file_open) /home/root/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:3339:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:3788:(snd_config_update_r) hooks failed, removing configuration
**** List of PLAYBACK Hardware Devices ****
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:1697:(snd_config_load1) _toplevel_:1:29:Unexpected char
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:3417:(config_file_open) /home/root/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:3339:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:3788:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:277: control open (0): Invalid argument
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:1697:(snd_config_load1) _toplevel_:1:29:Unexpected char
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:3417:(config_file_open) /home/root/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:3339:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:3788:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:277: control open (1): Invalid argument
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:1697:(snd_config_load1) _toplevel_:1:29:Unexpected char
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:3417:(config_file_open) /home/root/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:3339:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib /data/jenkins_worker/workspace/edison-weekly/out/linux64/build/tmp/work/core2-32-poky-linux/alsa-lib/1.0.28-r0/alsa-lib-1.0.28/src/conf.c:3788:(snd_config_update_r) hooks failed, removing confroot@elab_iot_edison:/home/speech_to_text# installPip.sh

我该怎么做才能解决这个问题?


/home/root/.asoundrc may be old or corrupted: consider to remove or fix it
Tom Yan

Answers:


1

好的,解决了。 .asoundrc文件存在一些问题。

用以下内容替换.asoundrc的内容并且它有效。其次 这个 链接来解决它。

pcm.!default {
    type hw
    card 0
}

ctl.!default {
    type hw           
    card 0
}
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.