I would like to use Amazon Alexa or Steven Hicksons Voicecommander (uses Google) on my Pi to automate some tasks by voice command, but I am having trouble getting the microphone to work in the first place.
I have a Pi 2 with Raspbian Jessie. I bought a 'Speedlink' USB soundcard which uses a C-media chipset and connected it directly to my Pi. I have a couple of microphones laying around and plugged the (mono) jack of one of those into the mic line in of the USB dongle. I use the hdmi out for sound output and would like to keep it that way.
Already in the GUI I can see the USB card and I can unmute the mic, boost its gain and turn off auto-gain. The same goes for alsamixer (they show identical settings).
lsusb shows the dongle,
cat /proc/asound/cards shows it as device 1 (not 0) and
arecord -l shows the usb as the only capture device (which is correct).
arecord -D plughw:1 --duration=5 -v -V mono testmic.wav starts the recording without errors, shows the settings of the device (format = S16_LE, which is correct) and a vumeter (showing between 0 and 2% even if I bang the mic on the table). Playing back the file I hear nothing, if I turn up the volume really high I hear some static.
I have found many people running into problems setting up a mic on the Pi, some people run into extra problems when using the C-media chipset. All of them list the problem as solved in the end and all the solutions amount to one of the following (some seemed specific for Wheezy):
-make sure the system sees the usb dongle (it does)
-make sure your user has audio rights (mine did from the start)
-add sndbcm2835 (did that but already seemed to be there)
-make sure you boost the mic gain (I did)
-set format to S16_LE (arecord already showed this)
-set the 'speed' to 1 (didnt understand this one)
-set the rate to 16000 (didnt help)
-make sure your mic plug is stereo (is that a possible cause?)
I thought since a mono jack connects to all wires even if in a stereo jack. On the other hand I already tried pretty much every software solution I could find but I really think the settings are correct. So I tried all kinds of combinations with my mono mics and some stereo jack plugs: recording with mic fully plugged in, plugged in half, plugged in a stereo jack splitter with one mic plugged in full and one mic plugged in half.
Still I havent been able to get the mic to record anything and Im getting a little hopeless. Im kind of leaning to it being a connector problem in some way, but still might be some software issue I dont understand too. Anyone got some ideas?
Update: problem probably with input type / power
Putting the line out (stereo) of my laptop in the mic in of the usb card it did record! Putting the mic of my turtle beach headset (stereo jack, although might be mono output) in the mic in of the usb card did not result in a signal. So either its a power issue or it really needs to be stereo somehow.This guy also reports he had to turn down the volume to about 50% to record anything.