How can I play audio file located in a certain path?

조회 수: 1 (최근 30일)
goutham gumm
goutham gumm 2018년 4월 16일
댓글: goutham gumm 2018년 4월 17일
I would like to know if there is a function in MATLAB in which you can play audio file located in a certain path on my computer. I would like to just pass the location of the audio file into the function and it should be able to play it. Is there any such function?

채택된 답변

Jan
Jan 2018년 4월 16일
편집: Jan 2018년 4월 16일

No, there is not one command for this, but three:

[y, Fs] = audioread(filename)
info    = audioinfo(filename);
player  = audioplayer(Y, Fs, info.BitsPerSample);
player.playblocking();

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by