regarding .wav file

Hey
Is there any way to convert a .wav file into .txt file using MATLAB? Please help.
Thanks!

 채택된 답변

Andreas Goser
Andreas Goser 2012년 1월 23일

0 개 추천

% Create WAV file in current folder for this test
load handel.mat
hfile='handel.wav';
wavwrite(y, Fs, hfile)
clear y Fs
% Read the data back into MATLAB
[y, Fs, nbits, readinfo] = wavread(hfile);
% Save as ASCII text file
save('handel.txt', 'y', '-ASCII')

댓글 수: 5

Aparna
Aparna 2012년 1월 24일
Thank you so much for this :)
But may i know what load handel.mat is for?
Wayne King
Wayne King 2012년 1월 24일
He's just giving you an example of a sound file that you can load and then save as a .wav file.
Andreas Goser
Andreas Goser 2012년 1월 24일
Yes. Example only, as I do not know if there is a WAV file in each and every MATLAB installation.
Aparna
Aparna 2012년 1월 24일
Ok thank you very much for your help! :)
Aparna
Aparna 2012년 3월 13일
I am sorry to disturb you on this query again but i am not very clear about what y is in the wavwrite step..
Can you kindly let me know about this?
Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2012년 1월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by