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

1 次查看(过去 30 天)
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