LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   USB Microphone Works with Audacity but not on the Web (https://www.linuxquestions.org/questions/debian-26/usb-microphone-works-with-audacity-but-not-on-the-web-4175563324/)

mattthumper 01-07-2016 11:27 AM

USB Microphone Works with Audacity but not on the Web
 
Hi,

I recently got my USB microphone working with Audacity under:
Debian 3.16.7-ckt20-1+deb8u1 (2015-12-14) i686 GNU/Linux

What I'd like to do is use that same microphone at the following Google/Chrome link in order to convert speech to text (mostly for the purposes of automating my note-taking process.):
https://www.google.com/intl/en/chrome/demos/speech.html

But the the microphone is never recognized, so nothing happens.
(And, BTW, the same microphone works fine on that same link/site when I'm using my Windoze box instead of the Linux machine.)

Here's further information:
My mic (from lsusb) - Bus 005 Device 003: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller

Audacity Devices - Host: ALSA; Playback Device: default; Recording: USB PnP Sound Device: Audio (hw:1,0): Mic:0; Channels: 1 (Mono)

Audacity Recording - Overdub (checked); Latency: Audio to buffer: 100; Latency correction: -130; Sound Activation Recording (checked); Sound Activation Level -50

Audacity Quality - Default Sample Rate: 44100 Hz; Real-time Conversion Default Sample Format: 32-bit float; Sample Rate Converter: Medium Quality; Dither: None;
High-quality Conversion Sample Rate Converter: Best Quality (Slowest) Dither: Shaped


How do I get the microphone to be recognized by my Google-Chrome browser?
TIA, Matt

sgosnell 01-07-2016 12:17 PM

Is pulseaudio installed? If so, you need to select the mic there. Pulseaudio can be a PITA to configure, and it's not always stable. The site can't see the device if pulseaudio doesn't show it.

mattthumper 01-08-2016 09:45 AM

Quote:

Originally Posted by sgosnell (Post 5474516)
Is pulseaudio installed? If so, you need to select the mic there. Pulseaudio can be a PITA to configure, and it's not always stable. The site can't see the device if pulseaudio doesn't show it.

Thanks for the reply.
It's installed, but cannot run:
/home/matthew : [861]

pulseaudio &
[3] 5957

/home/matthew : [862]

E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.

[3]+ Exit 1 pulseaudio


-----
Any ideas?

Thanks again.

sgosnell 01-08-2016 03:02 PM

It can't run because it's already running. You can't run multiple instances of it, only one, and it plainly says it's already running. I would suggest installing the pulseaudio volume control, run it, and see what is actually being selected as the microphone to use.

mattthumper 01-09-2016 07:08 AM

Quote:

Originally Posted by sgosnell (Post 5475209)
It can't run because it's already running. You can't run multiple instances of it, only one, and it plainly says it's already running. I would suggest installing the pulseaudio volume control, run it, and see what is actually being selected as the microphone to use.

Again, thanks for your patience.

When I run pavucontrol I see my mic on the Input Devices tab as well as the Configuration tab.
On the Input Devices tab it shows up as "CM108 Audio Controller Analog Mono", Port: Microphone; "Built-in Audio Analog Stereo", Port: Microphone/Microphone 1

On the Configuration tab it shows up as "CM108 Audio Controller", Profile: Analog Mono Input; "Built-in Audio", Profile: Analog Stereo Duplex

FWIW, I got 'arecord' to work also, via:
arecord --format=S16_LE --rate=44100 -D hw:1,0 --duration=5 /home/matthew/testme2.wav


Any ideas on what I should do now?

TIA, Matt

sgosnell 01-09-2016 08:39 AM

Is it actually selected in pavucontrol? You probably have to have an input application working in order to change selections. It's showing two ports, but I can't tell which is being used. The gui control on my system shows the chrome input and output, and clicking on whichever is displayed shows all the possible devices with a radio button to select one. If you're running pavucontrol from the command line, I need to research that, I haven't used it in some time so my memory isn't complete on it.

sgosnell 01-09-2016 09:02 AM

I just tried pavucontrol, and it uses the same GUI as from the menus. ISTR a different interface once, but perhaps my memory is failing. In any case, open the website and pavucontrol, then make sure your USB mic is selected as the input source, and that audio is being detected from it. The vu control underneath it should show that. Actually, as an input device it should be detected without having the website loaded. Select it and see if it reflects audio input. Pulseaudio is not intuitive, and you may need to select the proper port for recording and output. To select the port for recording, you must have an application for recording open and running. Also, on the Configuration tab, make sure the USB mic is turned on. If it works under Audacity it should be, but it's worth checking.

mattthumper 01-09-2016 10:54 AM

Solved
 
Thanks for the help.
It now works.

sgosnell 01-09-2016 11:03 AM

Glad you got it sorted out. Pulseaudio is an abomination, from the same dev who brought out systemd. User-friendliness is not something he understands, or even suspects.

patrick295767 01-21-2016 02:56 PM

Quote:

Originally Posted by sgosnell (Post 5475590)
Glad you got it sorted out. Pulseaudio is an abomination, from the same dev who brought out systemd. User-friendliness is not something he understands, or even suspects.

indeed.

Pulseaudio is not your friend, it will more raise problems than solve anything.

A classical .asoundrc might look like this.

Code:

pcm.!default {
          type asym
          playback.pcm {
                  type plug
                  slave.pcm "hw:1,0"
          }
          capture.pcm {
                  type plug
                  slave.pcm "hw:1,0"
          } 
 }

(on card #1, alsamixer -c1)

Simply use apulse if you need skype.


All times are GMT -5. The time now is 07:15 PM.