Voice inversion is a method of scrambling radio conversations to render speech nearly unintelligible in ordinary radio receivers. As the name implies, it inverts the audio spectrum of a signal, making the lowest frequencies the highest and vice versa. It is not considered encryption; it's merely a sort of Pig Latin on analogue signals. Several voice scramblers utilize it, like the Selectone ST-20.

Voice inversion is cancelled by reapplying the inversion, i.e. inverting the audio spectrum again. Here I'll present some least-effort digital descrambling methods for the voice inversion scrambler that may be of interest to hobbyist listeners. The examples are written in Perl.

Easy

In a digitally sampled signal, whole-spectrum inversion can be achieved very easily in the time domain by multiplying every other sample by −1. This is equivalent to amplitude modulating a Nyquist frequency carrier with the signal; the upper sideband will get inverted and nicely overlaid with the lower because of symmetric folding.

my $bandwidth = 4300; my $fc = $bandwidth * 2; # Using SoX for resampling and decoding/encoding WAV headers open my $inf, '-|', 'sox scrambled.wav -r '.$fc.' -c 1 -t .s16 -'; open my $outf, '|-', 'sox -r '.$fc.' -c 1 -t .s16 - descrambled.wav'; my $sign = 1; while (read $inf, my $sample, 2) { # Simply multiply every other sample by -1 print $outf pack "s", (unpack "s", $sample) * $sign; $sign *= -1; }

Because the whole spectrum is inverted, a sampling rate has to be chosen to (approximately) match the signal bandwidth. Slight distortion will still remain, unless the chosen Nyquist frequency perfectly matches the inverted zero frequency of the signal, or the "inversion carrier" as Selectone calls it. But speech will nevertheless be much more intelligible than in the original scrambled signal.

For example, consider a scrambled piece of audio that seems to have its highest frequency components at 4300 Hz. We would need to resample the audio at a rate of 8600 Hz and multiply every other sample by −1 to get intelligible audio.

To make things simpler, the Selectone ST-20B supports eight discrete carrier frequencies, namely 2632, 2718, 2868, 3023, 3196, 3339, 3495, and 3729 Hz, which they claim to be "the most commonly used inversion formats".

Difficult

If resampling is out of the question, we can also multiply the samples with a sine wave oscillating at the seemingly highest scrambled frequency. This will produce two sidebands; the lower will be our descrambled audio and will be conveniently at baseband. The upper sideband contains the inverted signal, but at such a high frequency it should not significantly impede intelligibility. We could improve the audio further by silencing the upper sideband using a lowpass filter.

# Sample rate my $fs = 48000; # Carrier frequency my $fc = 3729; # Optional filter - comment out to disable my $filter = " sinc -$fc"; my $fc = freq($fc, $fs); # Using SoX for resampling, filtering, encoding/decoding WAV headers open my $in, '-|', 'sox scrambled.wav -c 1 -b 16 -e signed -t .raw -'; open my $out, '|-', 'sox -r '.$fs.' -c 1 -b 16 -e signed -t .raw - ' . 'descrambled.wav' . ($filter // ""); my $phase = 0; while (read $in, my $sample, 2) { $phase += $fc; $phase -= 0x10000 if ($phase > 0x7FFF); # Multiply signal with sine wave print $out pack "s", (unpack "s", $sample) * sin($phase / 0x7FFF * 3.14159); } sub freq { return int(.5 + $_[0] * 0x10000 / $_[1]); }

A word about split-band scrambling

Some scramblers, like the PCD4440T, use a split-band inversion where the audio is split into two frequency bands that are then inverted separately and combined. The split frequency is user-adjustable. This is not a significant improvement; it would only require us to do the digital deinversion in two parts with different parameters.

Results

And here's a demo of what it sounds like. We begin with a (fake) scrambled message. Then the easy descramble comes on with a 1000 Hz error in the selected sampling rate; then the easy descramble with an error of 300 Hz; and the difficult method with a spot-on carrier frequency and with the upper sideband also audible. In the end, we also filter out the unwanted upper sideband.