reading the sound files as they are being recorded
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 17 Jan. 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 Kommentare
Walter Roberson
am 17 Jan. 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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Audio and Video Data finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!