or, How I Got 0 to 10 kHz Down a POTS Line -- For (almost) Free.
by Steve Jess
Statehouse Bureau Chief
Boise State Radio
At Boise State Radio, we cover news in a wide-ranging geographic area where good phone lines and reliable cell connections are at a premium. Sending stories to the "mother ship" from a remote location poses a familiar problem: out of good, fast, and cheap, you can have any two, but not all three. Ive devised a method for sending audio down a regular telephone line thats pretty good (up to 10k response), reasonably fast (not real time but faster than uploading a data file on a poor phone line), and pretty cheap (it uses low-cost software, and computer hardware that most of us already have).
Heres what youll get:
The ability to transmit recorded (not live) audio down the line with full low-end frequency response, and as much high-end response as you want: 3250 Hz response for full-speed transmission (sending a 60 second report in 60 seconds) up to 9,750 Hz response for one-third speed transmission (sending a 60 second report in three minutes).
Heres what youll need:
A computer at each end of the phone line running Windows 95, 98, or NT. Of course, the faster the better. At the sending end, a laptop will suffice. Both machines must have a Windows-compatible sound card.
Copies of CoolEdit audio editing software at each end. You can download and purchase CoolEdit 2000 for $69 at www.syntrillium.com. If you just want to experiment, the free, unregistered version will work.
The script files in this article on both computers.
A way to pass the output of the sending computers sound card down the phone line, and a way to record incoming phone audio onto the computer at the receiving end. This can be as complicated as a digital hybrid, or as simple as a pair of alligator clips.
How does it work?
Traditional hardware frequency extenders by Comrex and others have been on the market for about 20 years. They "lift" audio up by 250 Hertz, so the low frequencies pass above the cutoff of the average POTS line. One hundred Hertz becomes 350 Hertz, 1000 Hertz becomes 1250 Hertz, and so on. The process is reversed at the decoder end, restoring the low frequencies with only a slight sacrifice of high frequencies. Sending the audio at half- or one-third speed produces even better results. At one-third speed through a frequency extender, a phone line with a response of 250-3500 Hz can theoretically transfer audio from 0-9,750 Hz. That may not be studio quality, but its at least good cassette quality, and it only takes three minutes to transmit a one minute recording, keeping your telephone charges mercifully low.
How can we do this in software? The audio that a frequency extender sends down the phone line sounds exactly like a single sideband receiver thats tuned 250 Hz off-channel. So the trick is to make Cool Edit simulate an SSB transmitter/receiver pair operating 250 Hz out of tune.
Cool Edit has a function that modulates an audio file by the carrier of your choice, producing an upper/lower sideband pair just like an AM transmitter, but without a carrier in the center. In fact, an audio file modulated by a 10 kHz sine wave sounds exactly like first-adjacent channel interference on the AM band. The second essential feature is the FFT (Fast Fourier Transform) filter, which allows extremely precise filtering to eliminate the unwanted sideband in a single-sideband signal.
After some experimentation, I came up with the following sequence to shift audio up by 250 Hz. The graphs are from Cool Edits Frequency Analysis function:

1. Using FFT, we apply a low pass filter to the baseband audio so were not trying to modulate anything higher than the carrier frequency.

2. Modulate by an 8.25 kHz sine wave. Note the symmetrical sidebands.

3. Apply an 8.25 kHz high pass FFT filter to strip off the lower sideband. Now we have the output of our SSB "transmitter." If you tried to listen to the result, you wouldnt hear much, just some scratchy sounds at the high end.

4. Modulate the signal by 8.0 kHz (note the frequency offset) to "detect" our signal.

5. Apply an 8.0k high pass FFT filter to eliminate the spurious upper sideband. Compare this to the first graph. You can see everythings been shifted up by 250 Hz.
6. Finally, normalize the result to bring the audio peaks up to 0 dB.
The audio is now shifted up by 250 Hz, and ready to send down the phone line. At the receiving end, the process is essentially reversed, to shift the audio back down by 250 Hz.
Thats the basic normal-speed extender, which gives a potential 0 - 3250 Hz response.
Ive automated this process using a set of CoolEdit macros, or "scripts". For additional frequency range, I wrote scripts that stretch the audio by 200% and 300% on the encoder side, and compressed it by the same amount on the decoder side. This allows more frequencies to slip through the narrow bandwidth of the telephone network.
As you run the scripts, you may notice some additional time-compression and expansion of the wave file. In most cases, I added these steps to save time by having the computer act on fewer bytes of data, while still producing usable results. However, the script for 3x encoding of a 32 kHz file actually expands the file before modulating it. I found that modulating a wave file by a frequency significantly greater than 1/4 the sample rate (e.g., greater than 8 kHz for a 32 kHz file) produced spurious artifacts.
By the way, Ive used a hardware extender at one end and this software at the other, with satisfactory results. That makes sense, because they both use a 250 Hz offset.
How Long Does it Take?
I encoded and decoded a 30 second wave file (32kHz sampling, 16-bit data) using my AMD K6-2/266 mHz computer with 40 mb of memory. This is trailing-edge technology, so your results may be much faster.
| Speed | Encode | Transmit | Decode | Total | Approximate Bandpass* |
| Normal (1x) | :31 | :30 | :32 | 1:33 | 0-3200 Hz |
| Half (2x) | 1:03 | 1:00 | :39 | 2:42 | 0-6400 Hz |
| Third (3x) | 1:33 | 1:30 | 1:10 | 4:13 | 0-9800 Hz |
* After encoding, I passed the audio file through an FFT transform that simulates the 250-3500 Hz bandpass of a typical telephone circuit. Then I ran the decoding script and used the Frequency Analysis function to evaluate the result.
What Are the Drawbacks?
Of course, you're still sending an analog signal down a
POTS line, so you're at the mercy of the local telephone company. The quality of the
transfer depends on the quality of the connection.
In testing I've discovered that our office PBX adds quantization noise that's inaudible in
normal telephone use, but adds nasty distortion to files encoded for one-half or one-third
speed transmission. That's probably true of many locations.
Any medium that uses digital compression, such as a PCS mobile phone or a digital
answering machine, can also add serious artifacts
Also, since this is a macro running on a computer program, it's not as simple as a box you simply plug in and turn on. Practice before using on mission-critical audio, especially if you're facing a tight deadline.
Making It Work:
First, download and install Cool Edit 96. If you use the unregistered demo version, be sure to select the option to enable saving of wave files. (And, of course, if you decide to keep using Cool Edit, be sure to register!)
Download either or both of these script files. They are text files and dont need to be decompressed. Right click on the file name and select "Save Target as..." or "Download File...", depending on your browser. Place them in the directory where you installed CoolEdit (usually c:\cool).
extend32.scp <- for working with 32kHz sampled files.
extend44.scp <- for working with 44kHz sampled files.
Record an audio clip using 32000 or 44100 sampling, or open a file from your hard drive.
To speed up the process, make sure the undo option in the Edit menu is disabled. (Select Edit and if Enable Undo is checked, click on it.)
If you want to see whats happening to your file, type ALT+Z or select Analyze|Frequency Analysis to open a spectrum-analyzer style display.
Select Options|Scripts & Batch Processing...
In the "Cool Scripts" window, click on Open|New and select extend32.scp or extend44.scp, depending on the sampling rate of your file. (Because of the way Cool Edit stores function presets, using a macro that doesnt match your sampling rate will produce results that are weird, wonderful, and totally useless.)
Turning off the "Pause at Dialogs" option will make the script execute without interruption. Leaving it checked will allow you to see the settings for each function, but youll need to press the "Okay" button at each step. Make sure that "Alert when complete" is checked and "Execute Relative to cursor" is NOT checked.
Select one of the Encode scripts, such as Encode 2x.
Click on "Run". You will see CoolEdit execute each step of the script, and it will notify you when its done. You should have a frequency-extended file ready to send down a phone line.
To decode your file on the same computer or on the machine at the other end of the phone line, run the matching "Decode" script (e.g., Decode 2x to decode a file processed by Encode 2x).
The Lawyers Made Me Say This...
I have tested these scripts on a variety of computers under various conditions, and they work if used correctly. However, I have not tested them on your computer, so you are responsible, not me, for any unexpected consequences.
If you have any questions or comments, email me at sjess@news91.state.id.us
And Now for Something Completely Different...
If youve ever spent a night hunched over a shortwave radio, this final script should bring back memories. Its designed for 32kHz sound files only: ssb.scp
73 - sj