Halloween has come and gone, but this DIY voice changing Star Wars Stormtrooper helmet tutorial by [Shawn Hymel] is worth a look for a number of reasons. Not only is the whole thing completely self-contained, but the voice changing is done in software thanks to the Teensy’s powerful audio filtering abilities. In addition, the Teensy also takes care of adding the iconic Stormtrooper clicks, pops, and static bursts around the voice-altered speech. Check out the video below to hear it in action.
Besides a microphone and speakers, there’s a Teensy 3.2, a low-cost add-on board for the Teensy that includes a small audio amp, a power supply… and that’s about it. There isn’t a separate WAV board or hacked MP3 player in sight.
Making everything fit nicely in a project takes planning, and not only is the entire system self-contained in the helmet but there’s even ducted blower fans to help stave off heat exhaustion. The whole thing is beautifully done, and nicely shows off the capabilities of the Teensy when it comes to applying the audio filtering abilities.
We’ve seen voice changers using the Raspberry Pi + USB sound board, and even an Arduino + WAV shield in the past, but a Teensy based unit completely self-contained in a helmet is a first.
[via Sparkfun Blog]
27 thoughts on “Stormtrooper Voice Changer Helmet Uses Teensy To Mangle Audio”
I noticed that the device is sound-activated, but I couldn’t hear the source audio being altered…maybe I missed it somehow?
It’s actually pretty straight-forward to use a microcontroller to alter the frequency of the input (pitch up or down). THe simplest way is to input samples into a simple circular buffer at a constant rate, and read them out at a different rate. Works well enough for a simple device like this…
I think one problem is that the source is not isolated from the output. You can still hear the original voice from the helmet. To do that without depriving the person wearing the helmet of oxygen would be a challenge for another project.
Wouldn’t the circular buffer thing mean you’d eventually run out of buffer, as input samples come in, without the output ones being played yet? Or vice-versa, the chip trying to play samples that haven’t been input yet.
That only works for fixed sounds. For live input, it doesn’t.
My sister once had a cheap keyboard that did live, utterly real-time voice pitch changing. Dunno how it worked. Would heterodyning do it? Same way it does for radio. Just mix the audio with a frequency, then cut out the freq band you don’t want.
Otherwise it’d mean FFT, and that’s asking a lot for an Arduino.
FFT works very well on a Teensy (which is not an “Arduino”).
Oh right, it’s the one with the ARM in it. Still an Arduino though! Or at least it supports it, so it CAN be one. Otherwise, what, it’s an ARM12345XYZ.
Still, curious about how you do pitch-shifting, in realtime. I read about an analogue model that uses tape, and a bunch of heads on a wheel. The heads spin in the opposite direction (or I suppose the same) to the tape’s motion, as it’s being recorded. That apparently gets you pitch-shifting, and would therefore work with buffers I suppose. I can’t quite figure out how it all works, what you write, what you read, and how often. It would surely mean repeating certain samples, but WHEN do you do that? Surely you’d be glitching the waveform.
Real time pitch shifting is on my todo list for the Teensy audio library. This is the algorithm I have in mind:
It’s basically a phase vocoder, using 4 overlapped & windowed 1024 sample FFTs and 4 inverse FFTs. That’s slightly more than Teensy 3.2 can do at 96 MHz, but the new 180 MHz Teensy 3.6 ought to have enough speed to pull it off. Maybe?
Pitch shifting has nothing to do with a Vocoder. Vocoder has two inputs, and one output. One input doesn’t come out, but transforms the other input.
From memory, Cylon / Dalek voices were done by modulating audio with a 2Hz triangle wave.
I’ve done it, to reasonable effect using the method I described on an AVR a few years back. I qualified the approach with “well enough.” It isn’t a studio quality DSP algorithm by any means. It’s a cheap way to pitch shift with very limited resources.
The circular buffer approach would of course not work for live. Heterodyning would work and sound very strange, as it ads a frequency offset. So the ratios of the overtones to the ground tones will be disrupted. It is/was done if somebody’s voice on TV had to be changed, e.g. for witness protection or similar. Of course the face of the person was not shown. But it could be done with analog means, without digital signal processing.
To make it sound “good” (depending on what effect you want) you would need a multiplicative frequency change, but without a change in duration/speed. Today with DSP there are algorithms for pitch change which can do this, even in some DJ CD-players or mixing consoles.
The microphone placement for the video is horrible. I can barely hear the effect and him clearly. they need to re-record with the mic near the speaker.
The mic is most likely in the camera. That always sucks. No gain control in there either.
I could have sworn this was posted here already. I must’ve seen it somewhere else. Everyone was freaking out about the li-ion batteries right up against his face, and being breathed on (think moisture).
There’s certainly not enough lithium in that battery to react with moisture in your breath. If that were the case, no one would be keeping a cell phone anywhere nearby on a humid day (recently recalled phablet phones excluded from this example). Li-ion fires are typically the result of thermal runaway from improper/faulty charging.
With a phone you’re breathing in open air, not inside a mask which would allow more moisture to accumulate. I would be more concerned about moisture on the regulator board than the lithium that’s inside the cell.
That’s a different matter. If I were doing this as any more than a POC, I would conformal coat, encapsulate, or at least move the boards. You initially implied that moisture was a concern for the batteries, which is absolutely false, and a myth I see perpetuated quite a bit.
> a myth I see perpetuated quite a bit
> at least move the boards.
Don’t forget about the boards on the batteries themselves! Maybe that kapton is good enough. :/
Especially as Lithium Ion batteries do not contain any metallic lithium at all.
I like the table salt/sodium analogy. There was an incident at JPL recently involving Li-ion cells. An intern attempted to put the fire out with a C02 extinguisher, as did the fire fighters. Neither had Class D extinguishers on hand. The fire department was able to remove the batteries from the building and put out the fire with water.
Make two of them with better sound deadening inside, then have a storm trooper rap battle.
could you upload video of the thing actually turned on?
Teensy + audio library is really great. I’m using one as a ring modulator for live audio feed through a Dalek.
You keep using that term. I do not think it means what you think it means.
I actually have a pitch shifter working on the teensy. It took me god awful long to get it running. But good news is no FFTs needed!
would you care to share that teensy pitch shifting code anywhere? I would love to take a look at it!
would you care to share that code? I would love to take a look at how you accomplish pitch shifting on the teensy!
Please be kind and respectful to help make the comments section excellent. (Comment Policy)