reading the sound files as they are being recorded

3 次查看(过去 30 天)
Hi,
I have a program that calculates the angle of a arrival of a stationary sound source. Now, I want to find the angle of arrival of a moving sound source. For this I need to read my .wav files readily as the sound source speaks and calculate the time delay between the mics, could someone please tell me how to read the sound files readily into matlab program as they are being spoken.
Thanks in advance, padma

采纳的回答

Walter Roberson
Walter Roberson 2012-1-17
This would be difficult and probably not work right. WAV files include some data compression, so samples are buffered until it is determined that it is time to write the representation of them.
You would be better off reading from the microphone instead of from the .wav files, writing the samples to a file in binary, and also processing the samples, and then as an after-pass, read the binary back in and write it as a .wav
  4 个评论
Walter Roberson
Walter Roberson 2012-1-17
http://www.mathworks.com/help/techdoc/ref/audiorecorder.html
which you can use in non-blocking mode. It is not the recommended method, though: recommended is the Data Acquisition Toolkit, such as described http://www.mathworks.com/products/demos/daq/acquiring_data/acquiring_data.html
Your best bet, when timing information is important, is to use an A/D card that has a built-in facility to record sample time-stamps and include them with the returned data. Relying on system timing is *not* advisable, especially not in MS Windows.
Padma
Padma 2012-1-17
thank you, i'll get back to you if I have any doubts.

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by