intel edison voice control - wie wird alsa konfiguriert

728
mdam

Ich möchte einen sprachgesteuerten Rollstuhl mit Intel Edison implementieren. Grundsätzlich sage ich vorwärts, links, rechts und halte an einem Mikrofon, das über den Soundadapter an das Edison-Board angeschlossen ist .

Für den ersten Prototyp möchte ich nur die Ausgabe der Spracherkennung auf der CLI anzeigen.

Ich folge diesem Online-Tutorial. Alles ist gut bis zur Soundkonfiguration.

Als Nächstes befinden sich die CLI-Ausgänge der im Lernprogramm verwendeten Befehle.

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: (gibt hier einen Fehler)

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 

Was muss ich tun, um das Problem zu beheben?

2
`/home/root/.asoundrc kann alt oder beschädigt sein: Entfernen oder reparieren Sie es` Tom Yan vor 8 Jahren 0

1 Antwort auf die Frage

1
mdam

Ok, solved it. There was some problem with the .asoundrc file.

Replaced the content of .asoundrc with the following and it worked. Followed this link to solve it.

pcm.!default { type hw card 0 } ctl.!default { type hw card 0 }