[Subject Prev][Subject Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hts-users:01810] Re: convert wav file to short data file


thanks for your help, Alexis. the problem has solved.


From: Alexis Moinet [mailto:alexis.moinet@xxxxxxxxxx]
Sent: Mon 01/12/2008 12:47
To: hts-users@xxxxxxxxxxxxxxx
Subject: [hts-users:01809] Re: convert wav file to short data file

NB: I think it would be more helpful to post this kind of questions about x2x on sptk forum ;-)

I suppose you mean wavread in Matlab ?

in that case, this should do :

[x] = wavread('myfile.wav');%normalized [-1:1[
x = round(x * (2^15) );%integer 16-bits PCM
fid = fopen('myfile.raw','w');
fwrite(fid,x,'short');
fclose(fid);

for your white noise problem : did you check both little and big endian options when reading the raw short file ? what command did you use to generate and play the generated file ?

Alexis

Zheng, Dang C. a écrit :
Hi all,
 
 Any one know how to convert a wav file to a short data file?  I tried used wavread and x2x commands, but generated short data file does look right, I played the generated short file, it generated a white noise, nothing like the original speech. Any help will be appreciated.
 
Thanks in advance
 
Sarah

--
Scanned by iCritical.



--
Scanned by iCritical.



References
[hts-users:01808] convert wav file to short data file, Zheng, Dang C.
[hts-users:01809] Re: convert wav file to short data file, Alexis Moinet