필터 지우기
필터 지우기

Play low sampling frequency audio in matlab

조회 수: 5 (최근 30일)
arun sebastian
arun sebastian 2018년 4월 23일
편집: Walter Roberson 2018년 4월 23일
I have a 6467584*1 double array containing audio data. The sampling frequency for the data is 256. When I try to play the audio using the soundsc function it shows the following error :
% Error using sound (line 76) Device Error: Invalid sample rate. Error in soundsc (line 55)
sound(varargin{:});
Is there any function that I can use in MATLAB to play audio?

답변 (1개)

Walter Roberson
Walter Roberson 2018년 4월 23일
편집: Walter Roberson 2018년 4월 23일
The difficulty appears to originate in the portaudio layer; although sound() itself permits as low as 80 Hz, portaudio is not able to open something that low. Exactly what it can handle might depend upon your OS and hardware.
I am running a scan now to see what the lowest rate is that my system can handle. It may take a while.
foo = rand(1,1000);
for r = 80:8000; try sound(foo,r); fprintf('\nOk at %d!\n', r); break; catch ME; if mod(r,100)==0; fprintf('%d...', r); end; end; end
It is past 800 now; I will update when it stops.
... 1000 was the lowest accepted on my system.
You may need to resample your 256 to 1024 to play it.

카테고리

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