Azzera filtri
Azzera filtri

reading the sound files as they are being recorded

3 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Walter Roberson
Walter Roberson il 17 Gen 2012
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 Commenti
Walter Roberson
Walter Roberson il 17 Gen 2012
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 il 17 Gen 2012
thank you, i'll get back to you if I have any doubts.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by