Useful audio techniques for working with telephone systems and voice processing.
Each key on a telephone keypad produces a unique pair of frequencies — one from the row and one from the column. This dual-tone multi-frequency (DTMF) system is how phones signal digits to the network.
| 1209 Hz | 1336 Hz | 1477 Hz | 1633 Hz | |
|---|---|---|---|---|
| 697 Hz | 1 | 2 | 3 | A |
| 770 Hz | 4 | 5 | 6 | B |
| 852 Hz | 7 | 8 | 9 | C |
| 941 Hz | * | 0 | # | D |
Keys A–D were originally used in the military's AUTOVON network for precedence and preemption signaling, and can still be found in some amateur radio and PBX systems.
Generate clean DTMF (touch-tone) signals — especially helpful when working with telephone systems, IVR menus, and call center testing.
Each DTMF digit is two sine waves mixed together. FFmpeg can generate and mix these from the command line.
# Generate a single DTMF digit (e.g. "5" = 770 Hz + 1336 Hz) # Standard DTMF: 250ms tone ffmpeg -f lavfi -i "sine=frequency=770:duration=0.25" \ -f lavfi -i "sine=frequency=1336:duration=0.25" \ -filter_complex amix=inputs=2 -ar 16000 -ac 1 digit5.wav -y \ && play digit5.wav
18005551234 for a phone number)Generate standard telephone signaling tones with SoX — useful for testing IVR systems, simulating call flows, and understanding PSTN audio.
# Dial tone (North American) sox -n -r 8000 -c 1 dialtone.wav \ synth 3 sine 350 sine 440 \ && play dialtone.wav # Busy signal sox -n -r 8000 -c 1 busy.wav \ synth 0.5 sine 480 sine 620 \ pad 0 0.5 repeat 4 \ && play busy.wav # Ringback tone sox -n -r 8000 -c 1 ringback.wav \ synth 2 sine 440 sine 480 \ pad 0 4 repeat 3 \ && play ringback.wav # Off-hook warning (receiver left off hook) sox -n -r 8000 -c 1 offhook.wav \ synth 0.1 sine 1400 sine 2060 sine 2450 sine 2600 \ pad 0 0.1 repeat 20 \ && play offhook.wav # Comfort noise (low hiss for dead-air filling) sox -n -r 8000 -c 1 comfort_noise.wav \ synth 5 brownnoise vol 0.02 \ && play comfort_noise.wav # Call waiting beep sox -n -r 8000 -c 1 callwaiting.wav \ synth 0.3 sine 440 \ pad 0 9.7 repeat 2 \ && play callwaiting.wav # SIT tones (Special Information Tones — the "your call cannot be completed" intro) sox -n -r 8000 -c 1 sit.wav \ synth 0.33 sine 913.8 : \ synth 0.33 sine 1370.6 : \ synth 0.33 sine 1776.7 \ && play sit.wav # PSTN bandpass filter (make any audio sound like it's over a phone line) sox input.wav -r 8000 -c 1 phoneline.wav \ sinc 300-3400 \ && play phoneline.wav
Download audio from YouTube and other video platforms — useful for obtaining voice samples from public recordings like conference talks, interviews, and podcasts.
# yt-dlp is pre-installed on Call Center Village laptops cd ~/callcentervillage/voice-cloning # Download audio only from a YouTube video yt-dlp -x --audio-format wav -o "downloaded.%(ext)s" "https://www.youtube.com/watch?v=EXAMPLE" # If the output isn't WAV, convert with FFmpeg ffmpeg -i downloaded.webm -ar 16000 -ac 1 -c:a pcm_s16le sample.wav && play sample.wav # Download just a specific clip (e.g., 30 seconds starting at 1:05) yt-dlp -x --audio-format wav -o "clip.%(ext)s" \ --download-sections "*1:05-1:35" \ "https://www.youtube.com/watch?v=EXAMPLE" # Full pipeline: download, convert to 16kHz mono WAV, and play yt-dlp -x --audio-format wav -o "raw.%(ext)s" "https://www.youtube.com/watch?v=EXAMPLE" && \ ffmpeg -i raw.wav -ar 16000 -ac 1 -c:a pcm_s16le sample.wav && \ play sample.wav