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
댓글 수: 0
채택된 답변
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
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio and Video Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!