Saving an audio file in .wav format

63 ビュー (過去 30 日間)
Sri Srujan Gollapudi
Sri Srujan Gollapudi 2019 年 9 月 15 日
Hello,
I'm writing a program to record audio and save it as a .wav file. I'm able to record and play the voice, however, while using the audiowrite function the audio is getting clipped. The range of my audio signal falls between -1 and 1. I will attach my code and the plot of the audio graph. Can someone help me as to how to save the audio clip. I also used the 'save' command, but the file is not playable by VLC, Windows media player, etc.
a= audiorecorder(8000,8,1);
disp('start speaking')
recordblocking(a,5);
disp('End of recording')
myrec= getaudiodata(a);
plot(myrec);

採用された回答

Walter Roberson
Walter Roberson 2019 年 9 月 15 日
  3 件のコメント
Walter Roberson
Walter Roberson 2019 年 9 月 15 日
audiowrite('NameOfFile.wav', myrec, 8000)
Sri Srujan Gollapudi
Sri Srujan Gollapudi 2019 年 9 月 15 日
Thank you so much. Cheers!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by