Saving an audio file in .wav format

조회 수: 63 (최근 30일)
Sri Srujan Gollapudi
Sri Srujan Gollapudi 2019년 9월 15일
댓글: 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 CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by