How to read Audio File into Vector?

51 次查看(过去 30 天)
Hello, I have to read a Audio File (.wav) into a vector.
I know how to plot it:
info = audioinfo('sound.wav');
[y, Fs] = audioread('sound.wav');
t = 0:1/Fs:info.Duration;
t = t(1:end-1);
plot(t,y);
xlabel('Time');
ylabel('Audio Signal');
But this Sript does not read the Audio into a Vector.
I also tried to read every single Sample, but this is to complex and I get error after error. Is there a simple way to do this?
  2 个评论
Cris LaPierre
Cris LaPierre 2020-7-15
It would be helpful if you could share the error messages as well as your sound.wav file.
dieter alfred
dieter alfred 2020-7-15
Sorry, I cannot upload the file, because the forum doesnt accept the .wav filetype. And I have already deleted the code with the error messages. But next time I will upload everything.

请先登录,再进行评论。

采纳的回答

Sugar Daddy
Sugar Daddy 2020-7-15
编辑:Sugar Daddy 2020-7-15
[y, Fs] = audioread('sound.wav');
sound_duration = length(y)/Fs;
t = 0:1/Fs:sound_duration;
t = t(1:end-1);
%%
soundsc(y,Fs);
%%
plot(t,y);
xlabel('Time');
ylabel('Audio Signal');

更多回答(2 个)

George james
George james 2022-6-6
The help slides is providing the facility for a training program that has been producing high-quality audio. The https://www.resumesplanet.com/linkedin-profile-writing.php is quite a good option to get admission to these training programs.

Charlotte Oliver
Charlotte Oliver 2022-6-10
编辑:Charlotte Oliver 2022-6-10
there is alot of mistakes in this specific code for the correct program just visit this one https://consumeratings.com/ It will provide you the best code moreover correct your mistakes as well. happy to help you all.

类别

Help CenterFile Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by