필터 지우기
필터 지우기

reading the sound files as they are being recorded

조회 수: 3 (최근 30일)
Padma
Padma 2012년 1월 17일
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개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by