I have a Raspberry Pi 3 and trying to use a USB microphone in order to create a translator (i.e. https://daveconroy.com/how-to/turn-raspberry-pi-translator-speech-recognition-playback-60-languages/) as a class project. I've been running into a few problems (so I followed a couple of tutorials for guidance, but still hit road blocks), one of those problems being in trying to find a certain file "sudo nano usr/share/alsa/alsa.conf" and edit it in order to set my USB mic as the default sound card. Problem is, this file does not exist on my Raspberry Pi 3 (I get errors saying it doesn't exist, and if I create the file manually, it doesn't allow me to save it).

How can I get my USB microphone to work without having this file in the first place? Or am I just going a totally wrong way about this?

  • 1
    I just did a quick Google like this: google.com/search?q=raspberry+Pi+usb+microphone and there are a lot of sites offering information. I think what you are looking for is the alsamixer control, and there is another alternative called PulseAudio: raspberrypi.stackexchange.com/questions/639/… Meanwhile, welcome to Raspberry Pi SE. Be sure to take the raspberryPi.stackexchange.com/Tour to get the most out of this site. – SDsolar Apr 7 '18 at 7:23
  • I've already tried a search on Google similar to that (I can tell by the abundance of purple-colored links I've clicked on already). Problem is, many of these links lead to tutorials that go on different tangents, so if I have roadblocks following one tutorial, going on another tutorial for help will just result in me having to start from square 1. I'd rather just have a concise tutorial here for my Pi 3 on how to get it to recognize my USB mic so that I can record audio on it and get it one step closer to using the Pi 3 as a speech-to-text Google Translator device. – user84682 Apr 8 '18 at 1:53
  • You didn't mention whether you tried alsamixer or PulseAudio. Those usually work if the hardware is compatible. – SDsolar Apr 8 '18 at 5:35
  • PulseAudio is no longer in use on current raspbian distributions, which use Alsamixer @SDsolar . – scitronboy Apr 8 '18 at 17:26

Welcome to Stack Exchange!

it appears your problem is a simple spelling error. When you login to your rpi with the pi user, you land by default in the home directory, or /home/pi. And when you type commands on the command line, when you give a file location, such as usr/share/..., if you don't put a / in front, it appends that location on to the current directory. So when you type sudo nano usr/share/alsa/alsa.conf, what it is really trying too edit is /home/pi/usr/share/alsa/alsa.conf, which is not what you want. so redo the command, this time typing

sudo nano /usr/share/alsa/alsa.conf

and make sure you have the / in front of usr/share/....

Hope this helps!

  • Please feel free to let me know of any more problems you have! – scitronboy Apr 7 '18 at 15:22
  • it is unclear why the OP is not be able to save the file .... it doesn't allow me to save it – jsotola Apr 7 '18 at 18:36
  • He's unable to save it because he either not using sudo to edit/create the file or tried to edit the file before creating it. – scitronboy Apr 8 '18 at 17:25
  • 1
    Thank you! Adding the slash helped me access the file. However, I still have another roadblock. The Pi, for whatever reason, doesn't recognize my USB microphone. I've used "cat /proc/asound/cards" and "cat /proc/asound/modules", but I don't think I see anything related to my USB microphone. I'd post a picture but I can't find any option to do that here. This is the USB microphone I'm using: amazon.com/gp/product/B078SP1S92/… – user84682 Apr 8 '18 at 20:16
  • 1
    From following the tutorial @scitronboy linked to, I was able to see my usb mic, but it seemed to be listed with an error of some sort. When I try to use arecord -l I still run into the issue where it simply says "**** List of CAPTURE Hardware Devices ****" and nothing is below it. With all these issues, I'm deciding it's best to just try a different mic. Perhaps it's as @Wilf said that this mic just isn't compatible with my Pi's OS. May you guys please link any mics on Amazon that you know for sure will work with the Pi? – user84682 Apr 12 '18 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy