Rules | Recent posts | topic RSS | Search | Register  | Log in

Voice changer-distorter needed (PIC based)

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Hobby Circuits and Small Projects Problems
Author Message
mona



Joined: 22 Dec 2001
Posts: 31


Post13 Dec 2002 13:25   Voice changer-distorter needed (PIC based)

Hello

i want to build voice changer for my doughter (you know funny voice coming from hers mouth)? Anybody?
Back to top
Darkseed



Joined: 30 Nov 2002
Posts: 53


Post15 Dec 2002 2:35   

A general solution: program the PIC for doing this 3 steps:

- Sampling voice from a microphone.
- Convolution with a selected filter. You can
store several distortion filters in its impulse
response form. The way to select between filters
could be a simple push button.
- Output samples to loudspeaker.

In order to have a fair sound quality you should sample at least
at 8Khz (phone quality).

The best way to implement this schema is using a circular buffer.
Sampling and output should be implemented in interrupts. Work with
blocks and not sample to sample: it is much less CPU demanding. I
suppose you can stand some ms of lag. Very Happy

Good luck!
Back to top
mona



Joined: 22 Dec 2001
Posts: 31


Post15 Dec 2002 17:16   

thank you for quick reply. But I am new at PIC programming.....
maybe you have some examples or some links where can I begin... some examples in C language for filters or something like that...

thanks in advance
Back to top
Darkseed



Joined: 30 Nov 2002
Posts: 53


Post17 Dec 2002 10:19   

The only reference I had was a project I did about this for a TI DSP.
Unfortunately, I don't have the code now. Sorry.

Nevertheless, look for FIR filtering & PIC's at google or similar I suppose you could find something. Remember that a FIR filter looks like:

y[n+1]=a*x[n]+b*x[n-1]+...+k*x[n-k']

One filter is defined just by the values of a,b,c,...,k. You only need
to store different "sound-interesting" sets.


Anyway, this is not directly related with your project but I find it quite interesting for playback "recorded" sound. I attach you a simple, fast and also curious sound encoding system. You only will need 2 output pins.


Last edited by Darkseed on 18 Dec 2002 8:49; edited 1 time in total
Back to top
mona



Joined: 22 Dec 2001
Posts: 31


Post17 Dec 2002 20:48   

Thank you for quck reply.
I will look into it .... if i have problems I will defintily contact you... thanks quys and keep up good work...

p.s. only one question.... darkseed what do you mean by "sound-interesting" sets in previous reply?
Regards
Back to top
klug



Joined: 04 Jul 2002
Posts: 740
Helped: 5


Post18 Dec 2002 7:14   

Hi Friends!

Mona, you can make voice changing by storing samples and restoring them in different play speed by changing frequency of discretization. It will be the same effect as plaing tape on another speed of tape-recoder. But you will need a lot of memory added to your PIC.

Darkseed, do you have some trick to make digital voice scrambling? I am searching some algorithm. Only that I have is to shuffle blocks of voice in time. May be somebody has another solution?

Good Luck & 73! klug.
Back to top
Darkseed



Joined: 30 Nov 2002
Posts: 53


Post18 Dec 2002 7:50   

Hi mona,


By "sound-interesting set" I just mean a set of coefficients that make a distortion filter you personally like and wish to implement.
Back to top
Darkseed



Joined: 30 Nov 2002
Posts: 53


Post18 Dec 2002 8:03   

Hi klug,

You can do also frequency inversion (make high-frequencies sound low-frequency and viceversa). This is the scrambling method used in some comercial TV (C+ for example). Usually, this means working with phases and complex numbers but there is a nice trick if you do this inversion simetrically. In the said conditions, this kind of scrambling is acomplished by just multiplying every 2 samples by -1. Easy but effective and very low computational cost.

You can always add security by block scrambling with some pseudo-aleatory code but this much more computationally costly. Where are you going to implement this and what level of security do you expect?
Back to top
mona



Joined: 22 Dec 2001
Posts: 31


Post19 Dec 2002 9:00   

hello

if you want scrambling try some chips from Analog Devices like fx128 which is the simplest one and 3 or 4 more complicated....
Back to top
klug



Joined: 04 Jul 2002
Posts: 740
Helped: 5


Post19 Dec 2002 23:40   

Hi Friends!

Thanks for replies.

Mona, I have tested FX224 chip long time ago. I have bought 3 such chips for 60 $ - a lot of money for me. I tested them with big hopes, but without success. It is too simple. Even with splitting voice band on 2 parts and invert them separately. They say that this chip has 16 combinations of scrambling, but when I have tested it I have found that any combination can easely be understanding by 4 neighboring combinations or even more. I even have tried to make sincronouse switch of combinations up to dozen switching per second...

Darkseed, spectrum inversion is too simple. Much easy to make this inversion by analog method or by using special FX*** like chips. And about cable TV scrembling, BTW I have made such systems for our local cable TV providers ten years ago - easy to make inversion by taking another side band of suppressed AM of TV radiosignal.

Question about your second proposed method by adding pseudo-aleatory code. Will spectrum band be the same after scrambling? Is any additional information about this scrambling?

I am searching scrambler for universal using by telephone channel, radiotelephone, walkie-talkie and so on... Need to have a lot of security, perhaps 1000 or more combinations will be enough. I am curious, what methods are used in commercial voice scramblers? - never saw anyone.

73! klug.
Back to top
ASIC



Joined: 18 May 2001
Posts: 220


Post20 Dec 2002 8:28   

How can you get enough mips out of a PIC to do FIR filtering? To the best of my knowledge, it doesn't have a hardware (signed) multiplier?

ASIC
Back to top
Darkseed



Joined: 30 Nov 2002
Posts: 53


Post22 Dec 2002 20:27   

klug wrote:

Question about your second proposed method by adding pseudo-aleatory code. Will spectrum band be the same after scrambling? Is any additional information about this scrambling?


Bandwith will be increased. Exactly following this formulae:

Bout/Bin = Ts/Tc

Bout = Encripted signal Bandwith. [Hz]
Bin = Original signal Bandwith. [Hz]
Ts = Period of input symbol. [s]
Tc = Period of chip. [s]


In fact, this is plain CDMA. The difference is how you get
pseudo-aleatory sequence (cypher). I suppose you are already
familiar with pseudo-aleatory generators so the number of different
codes only depends of the generator size and how it's connected.

As CDMA is a standard I suppose there will be plenty of hardware
avaible ready to use. For more details look for CDMA.


The bandwith increment is not a good point if, as you said, want a
universal scrambler. In that case, why not using a chained cypher?
DES can work in this mode. I am not completely sure if it is possible with its successor AES (much more secure). For DES there should be also hardware avaible. Don't know about AES, but there should be also.


With this you can easily get a military grade scrambler. Twisted Evil
Back to top
Darkseed



Joined: 30 Nov 2002
Posts: 53


Post22 Dec 2002 20:34   

ASIC wrote:
How can you get enough mips out of a PIC to do FIR filtering? To the best of my knowledge, it doesn't have a hardware (signed) multiplier?


Personally, I have always used a DSP for signal processing. I agree
with you that a PIC is not a good chose. But, I've seen filters implemented for PICs in the web so I suppose it is possible
using high-end PICs limiting the number of coeficients of the filter and the bandwith used.
Back to top
klug



Joined: 04 Jul 2002
Posts: 740
Helped: 5


Post23 Dec 2002 0:03   

Hi Darkseed!

Thanks a lot for your info.

I have searched band by terms used by you and have found some info, maybe it will be useful for people interesting in voice scrambling:
http://www.transcryptsecure.com/techcorner/scrames.html

There are other articles about analog scrambling in directory:
http://www.transcryptsecure.com/techcorner/

I have found there a new trick with old inversion principle of scrambling.

I have tried discrete switching of inversion frequency, but these authors are gone little bit far by constantly changing of inversion frequency (look at picture on bottom of letter).

It is interesting and opens some new possibility. We can change frequency even more fluently by using direct synthesis by adding phase on accumulating summator. Changing of added phase by pseudo-aleatory number will constantly and fluently change inversion frequency. This frequency will used to be determinated noice. So, voice frequency will be shifted by this noice. As we can synchronously reproduse this noice at the receiver end, then we unshift voice to its Status Quo. It is interesting to try.

Please add your comments, Darkseed, and maybe you can add some digital idea to this.

Good Luck & 73! klug.
Back to top
Darkseed



Joined: 30 Nov 2002
Posts: 53


Post23 Dec 2002 14:32   

Sorry klug but I don't fully understand your proposition. Do you
mean you want scramble by randomly adding phase to the original
digitized signal? If not, explain it further, please.

Anyway, remember to be carefull with phase-shifts. As said in the
url you posted, when one increases the random frequency changes
per time unit, sound quality is worse. The reason is the loss of the
signal phase continuity.

See you.
Back to top
klug



Joined: 04 Jul 2002
Posts: 740
Helped: 5


Post23 Dec 2002 23:03   

Hi Darkseed!

This method is not going too far from original analog spectrum inversion scheme. There is mixer, inversion frequency generator and filters on input and output. But instead of constant inversion frequency we use permanently changing inversion frequency. Let say it is Frequency Modulated signal, or even Phase Modulated signal of Inversion Frequency.

On picture they used some linear intervals of phase changing. But maybe it is better to change phase of Inversion Frequency by some pseudo-aleatory number within some limits?

I do not know how to make conversion (multiplexing) of voice signal with inversion frequency by microprocessor, maybe it is symple? But I am not familiar with DSP methods, so I plan to make analog mixing, but to use processor for generating of inversion frequency signal. I will try to synthesize this frequency by making addition of phase in summator and taking sinus from a table and then produse sample by DAC. I know this method is named as DDS (direct digital synthesis) (once I have tried this method for RX heterodine, for this method is known as making signal with very low phase-noise). By changing adding phase we will make digital phase modulation. It is very symple to make such calculations by processor while frequency is very low up to 4 kHz. So, processor will calculate pseudo-aleatory number sequence, then adds this number to phase, then will add this phase to summator, takes sinus from table and sends it to DAC.

By using this digital method of synthesis we will obtain absolutely the same pseudo-noise signal in transmiter and receiver sides of channel, so we will decode signal with big precision. The only thing we have to do is narrowing of voice band and precise synchronization of coder and decoder.

What possible mistakes are hiding here? Or maybe there is DSP method to make the same conversion?

73! klug.
Back to top
Darkseed



Joined: 30 Nov 2002
Posts: 53


Post30 Dec 2002 7:19   

First of all, the DSP way is possible but computing intensive. But the idea of doing 100% digitally generating the inverting frequency, mixing
it with digitized voice and filtering the alias is attractive. On the
contrary, It will be much more battery hungry than the analog approach.
Just a matter of choice.

Just one comment about your scrambling method: you must control
the range of possible inverting frequencies. The reason is that the
signal generated with the proposed method is statistically white in that
range. This means output bandwith will be increased exactly the range
chosen. Here you have a tradeoff, if the range is to small is possible that
a centered range inversion frequency makes a fair descrambling it too
big bandwith is excessive.

Personally I don't see any other problem right now.

Hope that helps. Merry Christmas and Happy New Year to everybody
out there! (I couldn't stand saying it XD)
Back to top
sick_man
Guest






Post31 Dec 2002 17:00   

your all jibbering


it is so simple

pcwm pc width modulation

then mux the audio at low freq with a sequencer output from the pic

you need

a 4066 a pic
output say 400Hz - 10 Khz in banks of 10 tones randomly

then use the oscilation given in pwm to switch the 4066 chopping the audio back into its self

you could add a bucket brigade delay line chip to do this

also pcwm the timming of the on off of half the 4066

there are many technique
a nice topic


i made some years ago an fm scrambler
so when using a transmiter
unless you had two chips with the same code you couldnt be understoud but .... this isnt much use appart from the application it was intended
Back to top
emdee



Joined: 05 Oct 2002
Posts: 30


Post06 Jan 2003 9:29   the easy way out

some year ago, 8 years or so, Elektuur had another magazine in the netherlands, called ELEX.
In one of them they published a voice changer circuit. No microcontroller needed. It uses a singel chip that is designed for this purpose.
The artikel was called: Stem-vervormer.
I don't now the exact date, but i can look it up for you if you like. I even have the magazine somewhere. Shocked
Back to top
mona



Joined: 22 Dec 2001
Posts: 31


Post09 Jan 2003 0:22   

Hello

please emdee if you can.... it will be very helpfull... i have tried on 16F84 to do the work, but is to much for poor PIC... now i must wati for delivery of 18Fxx ....
Back to top
emdee



Joined: 05 Oct 2002
Posts: 30


Post13 Jan 2003 20:01   Found the artikel

Found It! Very Happy
It took me 4ever, but found the artikel. IT was publiced in september 1991 and it was called Stemverschuiver.
The project uses a sound chip which was specialy designed for this.
MSM6322 ( sms)
If you search the internet for this chip..you'll find a lot of schematics and stuff.
It's a chip that only needs a few extra components.
HAve fun
Back to top
rainbow



Joined: 22 Jul 2002
Posts: 16
Location: Out East


Post15 Jan 2003 3:51   Voice Changer

Not sure if it will help or hinder but...
Intel makes a "Sound Morpher" which will change anyones voice or other sound.
Unfortunately it only runs on a PC and not realtime...but maybe it will help you see what can be done...and the price is very reasonable..I got one free when I ordered their QX3+ PC based Microscope...it even includes a digital recorder which you dump back into the pc.
Back to top
mona



Joined: 22 Dec 2001
Posts: 31


Post15 Jan 2003 22:37   

Thanks Emdee, it looks promising... by the way you have any idea where can i buy this chip? In the Europe or if you have an adress (I have send e-mail to oki official dealer in Germany but no reply...)

thanks in advance

mona
Back to top
emdee



Joined: 05 Oct 2002
Posts: 30


Post18 Jan 2003 9:51   

Hi,

I have no idea where to get the chip. It's been so many years sinds it was published, It could be absolete by now.
However, if it is absolete there's proberly a replacement. Check the manufactorers website.

Maybe you can find the chip here:
h**p://www.a-source.nl/uk/index-uk.htm
Don't now if they sell in low quantity.
Good luck
Back to top
runner100



Joined: 27 Apr 2002
Posts: 26


Post26 Jan 2003 3:31   

Thanx for all the info. You guys have been very helpful.
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Hobby Circuits and Small Projects Problems
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap