Multiple conversion mp3 to wav ?

조회 수: 12 (최근 30일)
andrea
andrea 2012년 8월 14일
Hi, I'd like to know how can I convert many mp3 songs into wav ones taken from a path in my computer. (here there's also a mono conversion)
The simple code for a single conversion is:
[audio,fs,nbits] = mp3read('BrainDamage.mp3');
wavwrite(audio,fs, nbits,'BrainDamage.wav');
[audioMono,fs,nbits] = wavread('BrainDamage.wav');
Mono = (audioMono(:,1)+audioMono(:,2))/2;
wavwrite(Mono,fs, nbits, 'BrainDamageMONO.wav');
I know that with:
songs =dir('C:\myPath\*.mp3');
for ii=1:size(songs,1)
...
i can select all the mp3 files in my folder but how can I change their extension together?
thank you for your help

답변 (1개)

Walter Roberson
Walter Roberson 2012년 8월 14일
  댓글 수: 1
andrea
andrea 2012년 8월 14일
편집: andrea 2012년 8월 14일
sorry but I can't find the part where it's explained the multiple type-conversion. It only says how to select and import many file of the extension ".jpg".
I'd like to know how to convert many files from mp3 into wav (mono) with a loop for. How can i keep the name of the file, apply the conversion and give it to the new file with extension ".wav" ? thanks

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

카테고리

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