Firstly, I have no experience of exactly what you describe, but I do
have experience of speech processing and signal processing in general.
There may be a better way to do this than how I describe.
On Thu, 2009-05-21 at 00:26 -0400, Andrew wrote:> Let me preface this by saying I've done some searching online for
> related info and I'm kind of stuck and looking for advice. Not sure
> if this is the appropriate place to ask but here goes...
>
> I'm trying to run a filter on a speex audio stream that will do minor
> changes like raise the pitch or change the gain. I'm good with java
> so I've been looking at jspeex, but know very little about sound
> manipulation. My goal is to find/write a piece of code that will take
> a talking voice (a speex-encoded stream) and change it such that it is
> still understandable but sounds different.
I think it is probably overkill to try to tap into the speex processing,
although there may well be useful library routines (here I'm unfamiliar
with Speex, so I'll be happily shot down).
> Any ideas of how best to get this working? Is there an existing piece
> of open-source code that would help accomplish this? I'm looking to
> use/build something that can perform this transform in an automated
> fashion (no UI interaction needed).
>
The most obvious method would be to just pass the speech through a
non-linear filter. Something that clips the waveform should suitably
distort. I expect that the cheap gadgets you can buy to change your
voice do something like this.
Another, possibly more interesting, thing to consider would be to
extract the LPC coefficients from the speech stream:
http://en.wikipedia.org/wiki/Linear_predictive_coding
This will define a filter (analogous to the upper part of the vocal
tract). You can then play around with how you excite that filter. For
example, passing white noise through the filter will give you speech
that sounds whispered.
Linked to below is a pdf describing the basics of speech coding using
LPC I ripped from a report I wrote a few years ago.
http://www-sigproc.eng.cam.ac.uk/~whg21/speech_coding.pdf
I hope that's useful.
Cheers,
Henry