Sign in

username or email:

password:



Not a member?
Forgot your password?

Search compdsp



Search tips

Ads

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGA

Discussion Groups | Comp.DSP | Cutting and Resampling

There are 3 messages in this thread.

You are currently looking at messages 1 to .


Is this discussion worth a thumbs up?

0

Cutting and Resampling - kingdavid3 - 2007-03-19 12:33:00

I am reading a full length (duration of the speech) audio wave file 
sampled at 44.1KHz, 16 bit stereo. I want to cut a 15 second segment 
from the audio and resample it to 16000 Hz. So far I managed to do 
the resampling. Please help on how to cut 15 second length portion of 
the audio. Thank you 
 
[s, fs]=wavread('test.wav); 
 
%%cut to 15 seconds 
 
s=resample(s, 16000, fs); %downsample to 16000 Hz 
fs000; %new sampling
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Cutting and Resampling - Jerry Avins - 2007-03-19 13:16:00



kingdavid3 wrote:
> I am reading a full length (duration of the speech) audio wave file 
> sampled at 44.1KHz, 16 bit stereo. I want to cut a 15 second segment 
> from the audio and resample it to 16000 Hz. So far I managed to do 
> the resampling. Please help on how to cut 15 second length portion of 
> the audio. Thank you 
>  
> [s, fs]=wavread('test.wav); 
>  
> %%cut to 15 seconds 
>  
> s=resample(s, 16000, fs); %downsample to 16000 Hz 
> fs000; %new sampling

44,100 samples/second x 15 seconds = 661500 samples. Does that help?

Jerry
-- 
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Cutting and Resampling - kingdavid3 - 2007-03-19 13:36:00

Thank you very that help alot
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.