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 Center および File ExchangeAudio Processing Algorithm Design についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by