Audio and Prompts Discussions

Flat
sample freq issue not covered by FAQ
User: kmaclean
Date: 12/21/2006 12:09 pm
Views: 23675
Rating: 53
email from Robin: 
Hi Ken,

I'd like to contribute to voxforge, but after reading this FAQ-item:
"Audacity seems let me record at higher rates that my sound card supports"
have been trying to figure out the max sample rate of my sound card
(which is in fact the USB desktop microphone of Logitech). At Logitech
support they do not have that info for me (odd I know) and I couldn't
find anything conclusive on the internet.

So know I'd like to know how to figure this out.

I use Ubuntu linux myself, but will possibly use a winXP laptop for
recording (less fan noise).

Is there any way to query my OS or should I send you some testfiles
recorded at different sampling rates and can you tell from those (or
can I myself)?

Sorry to bother you with this stuff, I'm sure you are busy. I would
have preferred to leave a comment at the FAQ-item itself, but that
wasn't possible.

Thanks and good luck,
Robin

--- (Edited on 12/21/2006 1:09 pm [GMT-0500] by kmaclean) ---

Re: sample freq issue not covered by FAQ
User: kmaclean
Date: 12/21/2006 12:10 pm
Views: 583
Rating: 82
Hi Robin,

Sorry, my fault.  The term "Sampling Rate" is synonymous with the term "Sampling Frequency" (see this Wikipedia article on Sampling Frequency ).  So based on this web link (for the Logitech® USB Desktop Microphone):
http://www.logitech.com/index.cfm/products/details/US/EN,crid=103,contentid=6776,detail=2
it would seem that your mic has a frequency response of: 100-16kHz.  So, I think that the high end sampling rate for your USB mic is 16000 Hz (also referred to as 16kHz).

I'll update the FAQ to make things clearer.

Don't worry about not being able to submit audio at a 48kHz sampling rate, we need all the audio we can get (and from as many different PC configurations as possible)!

thanks for the feedback,

Ken

--- (Edited on 12/21/2006 1:10 pm [GMT-0500] by kmaclean) ---

Re: sample freq issue not covered by FAQ
User: kmaclean
Date: 12/21/2006 12:10 pm
Views: 444
Rating: 31
Hi Ken,

Thanks for your quick reply. I'll check wikipedia on this issue.However the 100-16kHz freq response has I think to do with the sounds that my microphone can pick up in the mechanical sense and not with the frequency at which it samples those sounds.

After reading some info on the subject I believe that the actual sample freq is usually fixed for USB microphones, but the only thing I do not know is at what mine is fixed (I read somewhere that there are only 2 possibilities though and both around 48 kHz).

Well let me know what you think.
Robin

--- (Edited on 12/21/2006 1:10 pm [GMT-0500] by kmaclean) ---

Re: sample freq issue not covered by FAQ
User: kmaclean
Date: 12/21/2006 12:10 pm
Views: 402
Rating: 22
Hi Robin,

Interesting!  I don't know much about USB mics, but I think we should be able to figure this out.  I'll do a bit a research, and keep you posted.

If you don't mind, I like to add this to the VoxForge forums section so that others might be able to help out too.

thanks,

Ken

--- (Edited on 12/21/2006 1:11 pm [GMT-0500] by kmaclean) ---

Re: sample freq issue not covered by FAQ
User: kmaclean
Date: 12/21/2006 12:11 pm
Views: 425
Rating: 30
I don't mind at all. I'd very much like to see speech recognition
coming to the open source world and as long as I don't know my mic's
characteristics I might as well contribute in other ways.

The info on wikipedia was interesting esp. the parts on the Sampling
theorem. What would be the maximum sampling frequency for a human
voice considering this theorem, possible digital filtering and the
characteristics of human voice?

Well that's only a rethorical question, esp. since my mic might be
fixed any way.

Keep up the good work,
Robin

--- (Edited on 12/21/2006 1:11 pm [GMT-0500] by kmaclean) ---

Re: sample freq issue not covered by FAQ
User: kmaclean
Date: 12/21/2006 12:11 pm
Views: 428
Rating: 13
Hi Robin,

A possible approach from: http://isthe.com/chongo/tech/comp/pwc/rh8.0.html
This deals with the Logitech USB camera setup, but might work for a USB mic.

Ken

[...]

Hotplug test

NOTE: While anyone can plug in a USB device, you often need to be the root user to view the system log files.

[...]

Tail the system log file:

tail -f /var/log/messages

and them plug in a Philips USB camera, Logitech QuickCam 3000 Pro, or PWC supported USB camera.

You should see something like the following messages in /var/log/messages:

kernel: hub.c: USB new device connect on bus1/2, assigned device number 3
kernel: pwc Logitech QuickCam 3000 Pro USB webcam detected.
kernel: pwc Registered as /dev/video0.
kernel: usbaudio: device 3 audiocontrol interface 1 has 1 input and 0 output AudioStreaming interfaces

kernel: usbaudio: device 3 interface 2 altsetting 0 FORMAT_TYPE descriptor not found
kernel: usbaudio: valid input sample rate 44100
kernel: usbaudio: device 3 interface 2 altsetting 1: format 0x00000010 sratelo 44100 sratehi 44100 attributes 0x00

kernel: usbaudio: valid input sample rate 22050
kernel: usbaudio: device 3 interface 2 altsetting 2: format 0x00000010 sratelo 22050 sratehi 22050 attributes 0x00
kernel: usbaudio: valid input sample rate 11025

kernel: usbaudio: device 3 interface 2 altsetting 3: format 0x00000010 sratelo 11025 sratehi 11025 attributes 0x00
kernel: usbaudio: valid input sample rate 8000
kernel: usbaudio: device 3 interface 2 altsetting 4: format 0x00000010 sratelo 8000 sratehi 8000 attributes 0x00

kernel: usbaudio: registered dsp 14,19
kernel: usbaudio: registered mixer 14,16
/etc/hotplug/usb.agent: Setup pwc audio for USB product 46d/8b0/2
/etc/hotplug/usb.agent: Module setup pwc for USB product 46d/8b0/2

hotplug/usb/pwc[7273]: Phillips webcam setup
hotplug/usb/pwc[7277]: Phillips webcam complete

 

--- (Edited on 12/22/2006 9:03 am [GMT-0500] by kmaclean) ---

Re: sample freq issue not covered by FAQ
User: kmaclean
Date: 12/21/2006 12:12 pm
Views: 525
Rating: 26
Hi Robin,

Still another approach that might work - if your USB mic is already attached, the same types of messages will show up in your system startup logs.  Therefore you can use the Linux "dmesg " command to copy your startup messages to a file and then search the file for the sampling rate of your USB mic.
dmesg is used to examine or control the kernel ring buffer.

The program helps users to print out their bootup messages. Instead of copying the messages by hand, the user need only:

dmesg > boot.messages
and mail the boot.messages file to whoever can debug their problem. 

see Todd's April 4, 2006 entry at http://whats.all.this.brouhaha.com/?p=193

Ken

--- (Edited on 12/21/2006 1:12 pm [GMT-0500] by kmaclean) ---

--- (Edited on 12/21/2006 1:13 pm [GMT-0500] by kmaclean) ---

Re: sample freq issue not covered by FAQ
User: kmaclean
Date: 12/23/2006 7:41 pm
Views: 555
Rating: 32
Hi Ken unfortunately the first method (tailing the log file) only
gives the following information:

Dec 22 13:54:59 robin-desktop kernel: [17180693.292000] usb 1-3: new
full speed USB device using ohci_hcd and address 3
Dec 22 13:55:00 robin-desktop kernel: [17180693.772000] usbcore:
registered new driver snd-usb-audio
Dec 22 14:08:06 robin-desktop kernel: [17181479.512000] usb 1-3: USB
disconnect,  address 3
(for connecting and disconnecting)

and the second (dmesg) only gives this much info:
[17180693.292000] usb 1-3: new full speed USB device using ohci_hcd
and address 3
[17180693.772000] usbcore: registered new driver snd-usb-audio

Anyway I guess also USB devices can have more then one sample freq
given the examples.

Strange, but perhaps this weekend I can find some more info.
Thanks for the suggestions,
Robin

--- (Edited on 12/23/2006 8:41 pm [GMT-0500] by kmaclean) ---

Re: sample freq issue not covered by FAQ
User: kmaclean
Date: 1/28/2007 8:14 am
Views: 403
Rating: 30
Hi Robin,

I have searched high and low for more information on how to determine the sampling rate of your Logitech USB Mic and cannot find anything more...

My recommendation is the trial and error approach ... try recording one sentence at 8 kHz, 16 kHz, 32kHz and 48kHz, and listen to them to see if the quality improves (you can send them to me if you want).

Otherwise, the only other approach I can think of is to simply record your prompts at a 16kHz sampling rate (this assumes you bought your mic in the past 3 or so years).

In reference to an earlier (rhetorical) question you had, Stephen Cooks Speech Recognition Howto (Revision 2.0, April 19, 2002) states that speech is relatively low bandwidth - mostly between 100Hz-8kHz.

Ken

--- (Edited on 1/28/2007 9:14 am [GMT-0500] by kmaclean) ---

Re: sample freq issue not covered by FAQ
User: kmaclean
Date: 1/28/2007 8:15 am
Views: 397
Rating: 23
Hi Ken,

Thanks for your efforts. Next time I will go for a better documented
product, though I did check out some forums for linux compatibility
and definitely didn't buy it too spontaneously. I guess you can never
be too carefull.

Since it is a fairly good microphone I will go by your advice and go
by trial and error. I might send them to you since the difference in
quality will be hard to hear on both my speakers and the speakers from
the laptop. Once I pick a recording setup I'll send you prompt files
and I'll promote the project as well.

Robin

--- (Edited on 1/28/2007 9:15 am [GMT-0500] by kmaclean) ---

PreviousNext