Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I couldn't find a hardware device. You don't have a valid microphone #28

Closed
Dani3lSun opened this issue Aug 27, 2014 · 3 comments
Closed

Comments

@Dani3lSun
Copy link

During the installation process, exactly when asking "Do you want to set up and check the speech recognition options?" I get the error message "I couldn't find a hardware device. You don't have a valid microphone" and the installer closes. I have an USB sound card plugged in (for headphone and microphone), and the hardware seems to work correctly. card number is 0.

List Devices:
Command: aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: Device [USB PnP Sound Device], Gerät 0: USB Audio [USB Audio]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: ALSA [bcm2835 ALSA], Gerät 0: bcm2835 ALSA [bcm2835 ALSA]
Sub-Geräte: 8/8
Sub-Gerät #0: subdevice #0
Sub-Gerät #1: subdevice #1
Sub-Gerät #2: subdevice #2
Sub-Gerät #3: subdevice #3
Sub-Gerät #4: subdevice #4
Sub-Gerät #5: subdevice #5
Sub-Gerät #6: subdevice #6
Sub-Gerät #7: subdevice #7
Karte 1: ALSA [bcm2835 ALSA], Gerät 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0

Command: arecord -l
**** Liste der Hardware-Geräte (CAPTURE) ****
Karte 0: Device [USB PnP Sound Device], Gerät 0: USB Audio [USB Audio]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0

Take a record:
Command: arecord -D plughw:0,0 -f cd test.wav
Works perfectly.

Play the recorded wav-file:
Command: aplay test.wav
Works also.

Config Files:
/etc/modprobe.d/alsa-base.conf
I edited it to
options snd-usb-audio index=0

/etc/asound.conf
I added this:
pcm.!default {
type plug
slave {
pcm "hw:0,0"
}
}
ctl.!default {
type hw
card 0
}

So I think that my audio input and output configured correctly...What else can be the mistake?
Thanks for your help!

@StevenHickson
Copy link
Owner

In voicecommand.cpp I look for the word "card" and the word "device":
fscanf(cmd, "%d:",&card);
You don't have that because it's in a different language.
So just edit the config file manually. You can do this by running voicecommand -e
Then you can add your hardware information manually with a line like this one:
!hardware==plughw:0,0

@Dani3lSun
Copy link
Author

Thanks, that helped. All is working now.

@ghost
Copy link

ghost commented Nov 23, 2014

Hi Steven ,
I have a little bit the same problem like highlite86.
I have pluged in a soundcard too and it still not working.

aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: ALSA [bcm2835 ALSA], Gerät 0: bcm2835 ALSA [bcm2835 ALSA]
Sub-Geräte: 8/8
Sub-Gerät #0: subdevice #0
Sub-Gerät #1: subdevice #1
Sub-Gerät #2: subdevice #2
Sub-Gerät #3: subdevice #3
Sub-Gerät #4: subdevice #4
Sub-Gerät #5: subdevice #5
Sub-Gerät #6: subdevice #6
Sub-Gerät #7: subdevice #7
Karte 0: ALSA [bcm2835 ALSA], Gerät 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: Set [C-Media USB Headphone Set], Gerät 0: USB Audio [USB Audio]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
arecord -l
**** Liste der Hardware-Geräte (CAPTURE) ****
Karte 1: Set [C-Media USB Headphone Set], Gerät 0: USB Audio [USB Audio]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Take and play a record works fine.
I don't edit my config files to 0 because the card is card 1

/etc/modprobe.d/alsa-base.conf

Keep snd-usb-audio from beeing loaded as first soundcard

options snd-usb-audio index=1
/etc/asound.conf
cm.!default {
type plug
slave {
pcm "hw:1,0"
}
}
ctl.!default {
type hw
card 1
}
voicommand -e
#This is the default config file
#These are the special options you can set (remove the #)
#!verify==1
#!keyword==pi
#!thresh==0.7
#!continuous==1
#!response==Yes Sir?
#!quiet==0
#!ignore==0
#!filler==0
#!duration==2
#!com_dur==3
#!hardware==plughw:1,0
#Here are the commands

But it's still not working when i want to test the speech recognition.
I hope you can help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants