# Troubles Analyzing Wave from Microphone

• bogdan
In summary, In order to obtain the spectrum of a discrete signal, you need to compute the discrete Fourier transform (DFT). However, it appears that you may not be getting the same results as programs that use a microphone. You may be able to improve your results by manipulating the window signal. Additionally, if the microphone is stereo, you will need to separate the left and right channels before processing the data.
bogdan
I tried to obtain the spectrum of a discrete signal and I had some problems...
If I compute on a PC the discrete Fourier transform (FFT or DFT) I obtain valid Fourier transforms (the same Excel computes...)...
...but how do I analyze a wave obtained using a microphone ? I don't get the same results professional programs do...I tried using as the "intensity" of a frequency the magnitude...I tried using the real component...the complex one...but still no good...
Can you help ?

so you have a signal recorded by the computer with a microphone and you want to make the FFT?
is the microphone stereo?

I obtained the FFT...but the spectrum doesn't look like the one obtained with a proffesiona program...
I applied the FFT algorithm to a chunk of 1024 samples...I found somewhere on the web that I shoul take a small chunk and duplicate it several time to obtain a periodic signal...and then compute the FFT...can you explain in detail how to process tha signal obtained with the microphone ? (it doesn't really matter if the signal is stereo...)

if the microphone it's stereo, the left and right channels are mixed in the file format. When I was studying voice compression in college all the microphones on the lab were mono. The teacher said that for stereo the chanels must be separated first...

can you explain in detail how to process tha signal obtained with the microphone ?

well I'm not an expert but here goes... take a number of samples that's a power of 2 (that makes the FFT easier to compute). Multiply that with a window signal (this is optional, but depending on which window signal you use it enhances the spectrum). Make the FFT...

Let's say...128 samples...multiplied by 8...gives 1024...apply FFT to this...and the spectrum consists in the magnitudes of the complex values of the FFT ?

well, basically yes

Okay...thx...

It is not clear to me what you mean by "does not look like". This is an easy thing to test, feed in a single frequency, you should see a single peak. Perhaps you could use Excell to generate a digital waveform of known content, then process the data with your program, It is very easy to make samll coding errors which give totally bogus results. A good habit is to test such software with a well know input.

Originally posted by Guybrush Threepwood
if the microphone it's stereo, the left and right channels are mixed in the file format. When I was studying voice compression in college all the microphones on the lab were mono. The teacher said that for stereo the chanels must be separated first...

well I'm not an expert but here goes... take a number of samples that's a power of 2 (that makes the FFT easier to compute). Multiply that with a window signal (this is optional, but depending on which window signal you use it enhances the spectrum). Make the FFT...

As I recall it is powers of 2 data points that make the FFT possible, so it is not nice but necessary.

I tried that thing with Excel...and it's the same...but I didn't obtain the same spectrum sound analysis programs give...got it ?

## 1. What is the purpose of analyzing wave from microphone?

Analyzing wave from microphone is essential for understanding the characteristics of sound waves. It allows scientists to measure the frequency, amplitude, and other properties of the sound, which can help in various fields such as speech recognition, music production, and noise pollution control.

## 2. How do you collect the wave data from a microphone?

The wave data can be collected using a microphone connected to a computer or other recording device. The microphone captures the sound waves and converts them into electrical signals, which can then be analyzed using software or other tools.

## 3. What are some common challenges in analyzing wave from microphone?

One of the main challenges is dealing with background noise, which can interfere with the accuracy of the wave data. Other challenges include calibrating the microphone, selecting the appropriate sampling rate, and choosing the correct analysis techniques.

## 4. Can analyzing wave from microphone be used for speech recognition?

Yes, analyzing wave from microphone is an important component of speech recognition technology. By analyzing the characteristics of the sound waves produced by human speech, computers can accurately recognize and transcribe spoken words.

## 5. Are there any ethical concerns related to analyzing wave from microphone?

There are potential privacy concerns when using microphones to analyze sound waves, especially if the data is being collected without the consent of the individuals being recorded. It is important to follow ethical guidelines and obtain consent when using this technology.

• Computing and Technology
Replies
3
Views
814
• STEM Educators and Teaching
Replies
3
Views
1K
• Electrical Engineering
Replies
4
Views
826
• Computing and Technology
Replies
27
Views
2K
• General Math
Replies
12
Views
1K
Replies
4
Views
1K
• Atomic and Condensed Matter
Replies
2
Views
1K
• Engineering and Comp Sci Homework Help
Replies
8
Views
2K
• Engineering and Comp Sci Homework Help
Replies
1
Views
3K
• MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K