DSPRelated.com
Forums

how to convert recorded speech sampling?

Started by khaifahaluk January 13, 2004
i'm new here, i am doing my university project on speech recognition,
if somebody could tell me how to convert recorded speech sampling?
i've already try using resample code from matlab, but the result was
that the sound of speech file dosen't sound very nice. the code that
i use was shown below: [y,Fs,bit] = wavread('test8k.wav');

Fs_new = 11025; %the new sampling rate
[p q] = rat(Fs_new/Fs,0.0001);
new_speech = resample(y,p,q);
[filename, pathname] = uiputfile('*.wav', 'Save Data to Wave File');
if filename ~= 0
wavwrite(new_speech,Fs_new,[pathname filename])
end
clear;



I am not sure how good a matlab is at changing sampling rate. Mebbe u
shd try cooledit on windows...or sox or esps/entropy (commercial) on
linux.

Mandar
--- khaifahaluk <> wrote:
> i'm new here, i am doing my university project on speech
> recognition,
> if somebody could tell me how to convert recorded speech sampling?
> i've already try using resample code from matlab, but the result
> was
> that the sound of speech file dosen't sound very nice. the code
> that
> i use was shown below: > [y,Fs,bit] = wavread('test8k.wav');
>
> Fs_new = 11025; %the new sampling rate
> [p q] = rat(Fs_new/Fs,0.0001);
> new_speech = resample(y,p,q);
> [filename, pathname] = uiputfile('*.wav', 'Save Data to Wave
> File');
> if filename ~= 0
> wavwrite(new_speech,Fs_new,[pathname filename])
> end
> clear; >


=====
-
Its not life that weighs us down,
Its how we carry it. __________________________________


Hi,

U can try using interpolate function.

[y,Fs,bit] = wavread('test8k.wav');

Fs_new = 11025; %the new sampling rate
p = rat(Fs_new/Fs);
new_speech = interp(y,p);

regards,
Abhijit --- In , "khaifahaluk" <khaifahaluk@y...> wrote:
> i'm new here, i am doing my university project on speech
recognition,
> if somebody could tell me how to convert recorded speech sampling?
> i've already try using resample code from matlab, but the result
was
> that the sound of speech file dosen't sound very nice. the code
that
> i use was shown below: > [y,Fs,bit] = wavread('test8k.wav');
>
> Fs_new = 11025; %the new sampling rate
> [p q] = rat(Fs_new/Fs,0.0001);
> new_speech = resample(y,p,q);
> [filename, pathname] = uiputfile('*.wav', 'Save Data to Wave File');
> if filename ~= 0
> wavwrite(new_speech,Fs_new,[pathname filename])
> end
> clear;



Hi Khaifahaluk,

You can use SoX (Sound eXchange) instead of Matlab.
Quite handy software. It's text-base though.
Resampling, converting, fading,..., it's all there.

Visit this:

http://sox.sourceforge.net/

fajar
--- In , "khaifahaluk" <khaifahaluk@y...>
wrote:
> i'm new here, i am doing my university project on speech
recognition,
> if somebody could tell me how to convert recorded speech sampling?
> i've already try using resample code from matlab, but the result
was
> that the sound of speech file dosen't sound very nice. the code
that
> i use was shown below: > [y,Fs,bit] = wavread('test8k.wav');
>
> Fs_new = 11025; %the new sampling rate
> [p q] = rat(Fs_new/Fs,0.0001);
> new_speech = resample(y,p,q);
> [filename, pathname] = uiputfile('*.wav', 'Save Data to Wave
File');
> if filename ~= 0
> wavwrite(new_speech,Fs_new,[pathname filename])
> end
> clear;