Error with audiowrite R2020b

3 次查看(过去 30 天)
Babacar Dieng
Babacar Dieng 2021-9-26
[y,Fs]=audioread(InFilename);
%Downsample
fprintf('\n The downsampled sound \n')
x = y(1 :2 : length(y));
fs2 = Fs/2 ;
% sound(x,fs2);
%Save the result as down.wav
audiowrite(x, fs2, 'down.wav');
  1 个评论
Babacar Dieng
Babacar Dieng 2021-9-26
File name must come first. there was an error with the format of the line command

请先登录,再进行评论。

回答(1 个)

Babacar Dieng
Babacar Dieng 2021-9-26
audiowrite( 'down.wav', x, fs2, "BitsPerSample" , 8 );

标签

Community Treasure Hunt

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

Start Hunting!

Translated by