DSPRelated.com
Forums

Speeding up and slowing down speech

Started by squall060406 September 1, 2010
Hello!

I d like to know how can i speed up and slow down speech in real time with 6416 DSP. I am still beginner with DSP so if anyone have some project done or even source code(the more simple is the best) i would appreciate it if u send me on e mail(s...@gmail.com). Thanks

_____________________________________
Squall,

To speed up speech...
sample at a low rate, say 8k/sec
output the same data at a higher rate, say 16k/sec
This speed up operation means there will be be gaps in the speech output as the input
is slower that the output.

To slow down speech...
sample at a higher rate, say 16k/sec
output at a low rate, say 8k/sec.
This slow down operation means there will have to be gaps during the speech sampling as
the data is not being consumed as fast as it is being input.
A (possibly) better way is...
to speed up speech...
use the average of some adjacent samples as a single output data item.

to slow down speech...
as needed, repeat a input sample every so often in the output.

R. Williams

---------- Original Message -----------
From: "squall060406"
To: c...
Sent: Wed, 01 Sep 2010 12:15:57 -0000
Subject: [c6x] Speeding up and slowing down speech

> Hello!
>
> I d like to know how can i speed up and slow down speech in real time
> with 6416 DSP. I am still beginner with DSP so if anyone have some
> project done or even source code(the more simple is the best) i would
> appreciate it if u send me on e mail(s...@gmail.com). Thanks
------- End of Original Message -------

_____________________________________
Thank you for your answer, but i don't know how can i output data at different rate. I didnt find any example of that. Here is one example from Rulph Chassaing's book. I see where i change sampling rate, but how i set different output rate? Thanks

//Loop_intr.c Loop program using interrupt.Outputayed input

#include "dsk6416_aic23.h" //codec-DSK support file
Uint32 fs=DSK6416_AIC23_FREQ_8KHZ; //set sampling rate

interrupt void c_int11() //interrupt service routine
{
short sample_data;

sample_data = input_sample(); //input data
output_sample(sample_data); //output data
return;
}
void main()
{
comm_intr(); //init DSK, codec, McBSP
while(1); //infinite loop
}

_____________________________________
squall,

The Rulph Chassaing book has examples of separating the input from the output and
double buffering the Input and the Output.

The suggested software interrupt would make any desired modifications to the data.
Such modifications as doubling each input to datum when it is copied to the output
buffer to slow the voice down (in this case, by 1/2)

Such modifications as averaging adjacent triplets of input datum and only writing the
average value to the output buffer to speed the voice up (in this case, by 3:1)

Note that the Rulph example(s) make use of the EDMA for input with double buffering and
output with double buffering.

R. Williams

---------- Original Message -----------
From: s...@gmail.com
To: c...
Sent: Sat, 04 Sep 2010 05:36:41 -0400
Subject: [c6x] Re: Speeding up and slowing down speech

> Thank you for your answer, but i don't know how can i output data at
> different rate. I didnt find any example of that. Here is one example
> from Rulph Chassaing's book. I see where i change sampling rate, but
> how i set different output rate? Thanks
>
> //Loop_intr.c Loop program using interrupt.Outputayed input
>
> #include "dsk6416_aic23.h" //codec-DSK support file
> Uint32 fs=DSK6416_AIC23_FREQ_8KHZ; //set sampling rate
>
> interrupt void c_int11() //interrupt service routine
> {
> short sample_data;
>
> sample_data = input_sample(); //input data
> output_sample(sample_data); //output data
> return;
> }
>
> void main()
> {
> comm_intr(); //init DSK, codec, McBSP
> while(1); //infinite loop
> }
------- End of Original Message -------

_____________________________________