LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

audio to binary conversion

Solved!
Go to solution

Hello, i want to take audio input from microphone and convert it into binary data (stream of 0s and 1s).. Suggestions are welcomed. I'm using Labview 2011. 

0 Kudos
Message 1 of 9
(6,319 Views)

Hi Jhareesh,

 

you get some U8 or U16 values from your "microphone". Convert them using NumberToBoolArray to get a "stream of bits"...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(6,318 Views)

Hello GerdW,

 

                       i tried based on wht i understood from ur post.  but, i'm not getting stream of bits here.. please go through the pic and suggest the changes to be made. I would be glad if u can send a vi file for that. 🙂

 

              Thnx in advance...

0 Kudos
Message 3 of 9
(6,297 Views)
Solution
Accepted by Jharesh

Hi Jhareesh,

 

you already get the bits for one sample of your sound data. When you need the bitstream for all samples you should

- not convert to a single sample but to a waveform/array of samples

- build an array of bits by concatenating them to a 1D array...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(6,290 Views)

I needd conversion of audio to binary matrix for serial transmission of bits.The code snippet has been attatched but I'm failing to reproduce at the reciever end.I could not understand the faulty in it .Can any one help me in rectifying it. 

0 Kudos
Message 5 of 9
(6,047 Views)

Hi Balaram,

 

what exactly are you trying to do?

 

You acquire some sound data (analog waveform!), then you convert the analog waveform to a digital waveform: but WHY are you wiring the inputs of this 2nd conversion with some wierd values? WHY are you ignoring the coercion dots?

 

General recommendation: Read the LabVIEW help for each function you are unfamiliar with!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(6,042 Views)

Thanks GerW  for ur suggestion.A modifies snippet has been attatched.Look at it and help me in recieving the input waveform.

0 Kudos
Message 7 of 9
(6,037 Views)

Hi Balaram,

 

I don't know what you are trying to set with all those additional input constants.

 

When I use thissimple snippet:

check.png

I get the sine wave in the graph as expected…

 

General recommendation: try to stay away from ExpressVIs. They most often don't make your life easier… 😄

General recommendation: Do you notice the difference between your images and my snippet? Please attach VIs or snippets, but no plain images!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(6,031 Views)

I'm least worried about the "Acquire sound",But i need only a digital format (o's,1's) as output at the transmitter(at the end ).

Message 9 of 9
(6,025 Views)