LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview capture audio

Hello,

i wish to use Labview to capture the audio at my PC microphone,

I tried both sound-->acquire wizard

and also sound-->configure-->sound input read

 

both can produce sound wave, however the 1st second is flat line, then only audio wave comes in, i do not know why the 1st 1 second is flat always, is it something to do with windows driver?


i only interested at 100ms wave, but now i must wait until 1.1second then trim the 1second away. is there way to make soundwave available immediately after we run labivew to capture?

 

Thank you.

 

jackson_thom_0-1593669638809.png

 

0 Kudos
Message 1 of 6
(3,571 Views)

Find Examples>Continuous Sound Input

Find Examples>Finite Sound Input

 

The first one if you want to continuously acquire, and take snapshots, optionally with a pre\post trigger. The second one if you want to acquire at a trigger (like a press of button).

 

0 Kudos
Message 2 of 6
(3,538 Views)

Depending on your microphone connection (or the existence of a different microphone), the availability of other hardware (i.e. a DAQmx capable device) and your triggering needs, you might try instead connecting to an Analog Input and then triggering that.

 

I recently had a similar issue with the Windows sound card acquisition and couldn't get it to reliably trigger at the time I wanted (or at least, I didn't believe that the delay was repeatable - maybe I was wrong) and I had much better luck connecting an accelerometer to a USB DAQmx device and then using that as a microphone.

 

Of course, my audio quality wasn't as good as with a dedicated microphone, but it worked for my purposes. Since the microphone I had was USB, I didn't have a nice option to connect it as an analog input.


GCentral
0 Kudos
Message 3 of 6
(3,532 Views)

I'm running LabVIEW 2019 SP1 (32-bit).  I have a USB Microphone and a Web Cam (and maybe a microphone in my laptop, but I'm working with the lid closed and external monitors and keyboard/mouse).

 

When I run the Finite Sound Input, start it, and as I push start say "One, two, three" in fairly rapid succession (with the default parameters that come with that example), I see two clear "sound bursts" that I think corresponds to "One, two".  Just a minute, I'll double the number of samples and see if I see three peaks ... yep, three bursts.

Speech 1,2,3.png

 This is coming from my USB Microphone (I know because it has an on-off switch, and I only get very low voltage "noise" if I switch it off).

 

This is a 2-year-old Dell laptop, nothing particularly fancy.  When I plug in the Microphone (after rebooting), Windows 10 makes its little "USB sound" and says "I connected your Microphone", which turns out to be Device 0.

 

So, "it works for me ...".

 

Bob Schor

0 Kudos
Message 4 of 6
(3,515 Views)

i realized windows is actively automatic control microphone input,

is there a way to override this? such that i get a "original" microphone input?

0 Kudos
Message 5 of 6
(3,485 Views)

I'm not sure if this can be fixed from LabVIEW (easily).

 

Others had this problem:

https://appuals.com/how-to-stop-microphone-from-auto-adjusting-windows-10/

0 Kudos
Message 6 of 6
(3,470 Views)