FFT Channel Vocoder
Built by a blind programmer and musician, for musicians
A Python package that applies spectral envelope transfer using FFT-based processing. The vocoder takes a modulator (voice) signal and imposes its spectral envelope onto a carrier signal.
Designed with accessibility as a core principle: CLI first, no GUI, cross-platform, automated batch processing—built by a blind developer for everyone who deserves equal access to audio tools.
Now on PyPI: pip install fft_channel_vocoder
Demonstration
Hear the FFT Vocoder in action:
FFT Vocoder Demo Video — Original voice, vocoded track, and vocoded track with music + code displayed on screen
Documentation
- Documentation — Installation, tutorials, configuration, and troubleshooting
- Design Philosophy — Why we built it this way, design decisions, and algorithm choices
- Algorithm Deep Dive — Technical details for audio engineers and researchers
Features
- Spectral Envelope Transfer: Extracts formant information from voice and applies it to carrier signals
- Multiple Input Formats: Supports voice files, MIDI files (synthesized to carrier waves), pre-generated synth wave files, and scale-based pitch correction
- Pitch Correction: Optional automatic pitch detection and correction to user-defined musical scales with noise gate
- Batch Processing: Automatically processes multiple input files with consistent naming patterns
- Generator-based Design: Uses Python generators for efficient iteration through numbered file sequences
- Accessibility First: CLI interface, fully accessible to screen readers, works across platforms
Installation
From Python Package Index (PyPI)
The easiest way to install is from PyPI:
pip install fft_channel_vocoder
Then run the vocoder with:
vocode
From Source
Clone the repo and install in development mode:
git clone https://github.com/your-repo/fft_channel_vocoder.git
cd fft_channel_vocoder
pip install -e .
Usage
Command Line
Run the vocoder with files in the input folder:
vocode
Show help and usage information:
vocode -h
vocode --help
Open the configuration menu to adjust settings:
vocode -c
vocode --config
Or run using Python module syntax:
python3 -m fft_channel_vocoder
Input Structure
The vocoder expects files organized in an input/ directory:
input/
voice1.wav # Modulator signals
voice2.wav
melody1.mid # MIDI files to synthesize as carrier
melody2.mid
synth1.wav # Pre-generated synth wave files as carrier
synth2.wav
synth3.wav
scale1.txt # Scale files for pitch correction (one note per line)
scale2.txt
Scale File Format:
Each scale file contains one note class per line. Supported note classes are: c, c#, d, d#, e, f, f#, g, g#, a, a#, b. Comments (lines starting with #) and blank lines are ignored.
Example scale1.txt (C Major scale):
# Major scale
c
d
e
f
g
a
b
Processing Flow
For each voice file, the vocoder:
- MIDI Processing: Synthesizes each MIDI file into a carrier wave and vocodes with the voice
- Synth Wave Processing: Loads each pre-generated synth wave file and vocodes with the voice
- Pitch Correction: Detects pitch from the voice and snaps to a user-defined scale, synthesizes a carrier wave, and vocodes with the voice
- Whisper Generation: Creates a stereo whisper track by vocoding the voice with white noise
Pitch Correction Details:
- Analyzes the voice for dominant frequencies in the range 50-2000 Hz
- Snaps detected pitches to a defined musical scale (octave-independent)
- Uses a noise gate (-40 dB by default) to prevent unwanted tuning during silence or low-amplitude content
- Maintains the last detected note when below the noise gate threshold
Output Structure
Processed files are saved to output/:
output/
voice1_melody1.wav # Voice + MIDI synthesis
voice1_melody2.wav
voice1_synth1.wav # Voice + Synth wave 1
voice1_synth2.wav
voice1_synth3.wav
voice1_scale1.wav # Voice + Pitch-corrected carrier (scale 1)
voice1_scale2.wav # Voice + Pitch-corrected carrier (scale 2)
voice1_whisper.wav # Stereo whisper track
Configuration
Configuration is stored in fft_channel_vocoder/config.json. You can edit it directly or use the configuration menu:
vocode -c
Configuration Options
sample_rate: Audio sample rate in Hz (default: 96,000)vocoder_fft_size: FFT window size as a power of 2 (default: 12, which equals 2^12 = 4096 samples)vocoder_hop: Hop size divisor for vocoder FFTs (default: 4, calculates as fft_size / 4)pitch_correct_fft_size: FFT size for pitch correction as a power of 2 (default: 11, which equals 2^11 = 2048 samples)pitch_correcter_hop: Hop size divisor for pitch correction FFTs (default: 4)
Algorithm
The vocoder works in 5 steps:
- STFT Analysis: Compute Short-Time Fourier Transform for both voice and carrier
- Spectral Smoothing: Apply frequency-dependent Gaussian blur to extract formant envelopes
- Temporal Envelope: Apply asymmetric attack/release smoothing across time to preserve consonant transients and sustain vowels naturally
- Envelope Transfer: Apply spectral whitening to the carrier, then scale by voice envelope
- Reconstruction: Inverse STFT with original carrier phase to recover time-domain signal
Module Reference
main.py: Core pipeline and file iterationfft.py: FFT vocoding algorithmclean_io.py: Audio file I/O with resamplingclean_audio.py: Audio preprocessing and validationconfig.py: Global configuration parametersmidi_synth.py: MIDI to audio synthesispitch_corrector.py: Pitch detection and scale-based note snappingscale_synth.py: Pitch-corrected carrier synthesisnoise_generators.py: Noise generation utilitiesbuffers.py: Buffer management utilities
Disclaimer
This project was developed with AI-assisted development. While some parts of the code were built with AI assistance, the program ideas, architecture, and design philosophy are original.
Metadata
Release files for fft-channel-vocoder 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fft_channel_vocoder-1.2.0.tar.gz | 22.5 kB | With provenance | Details for fft_channel_vocoder-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fft_channel_vocoder-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for fft_channel_vocoder-1.2.0-py3-none-any.whl |
Total release size: 50.7 kB
Release files / fft_channel_vocoder-1.2.0.tar.gz
| Download URL | fft_channel_vocoder-1.2.0.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b782251f04ca66f64208a273fb6be6545d3ada810c693c79404349e982c0706
|
|
BLAKE2b-256 checksum How to use checksums |
951a8b6007815e61f314bb0589fe50dd719f546eeade40c4d1163f57d97e4f4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / fft_channel_vocoder-1.2.0-py3-none-any.whl
| Download URL | fft_channel_vocoder-1.2.0-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b67291a9198723f76f9bffddfac1a68b7ae164859bd9c6e480dff8f5c83fdf2
|
|
BLAKE2b-256 checksum How to use checksums |
858da0f5b9027af441fd0cd3636d8242dd5e1316c9ed209a3a446b2b0e98a6ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logSecurity for fft-channel-vocoder 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for fft_channel_vocoder-1.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.