Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Voice changer-distorter needed (PIC based)

Not open for further replies.


Junior Member level 3
Dec 22, 2001
Reaction score
Trophy points
Activity points
msm6322 buy


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

pseudo-aleatory 16f84

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. :D

Good luck!

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

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:


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.

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?

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.

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.

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?


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

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.

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?


klug said:
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.
Tc = Period of chip.

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:

ASIC said:
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.

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:
**broken link removed**

There are other articles about analog scrambling in directory:
**broken link removed**

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.

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.

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.

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)

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

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. 8O


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 ....

Not open for further replies.

Part and Inventory Search

Welcome to