AP-BWE telephony → 24 kHz (Hindi), fine-tuned
Upscales 8 kHz telephone speech (real content stops at about 3 kHz) to 24/48 kHz without changing the words. It's a fine-tune of AP-BWE (8k→48k, MIT) on Hindi speech degraded to match real call recordings.
Content-safe by design: the model only adds the missing high band. Below the clip's own cutoff (about 2.9 kHz) the output is the original recording, with a measured difference of 0.01 dB. The words, accent and timing can't change.
Files
| File | What it is |
|---|---|
apbwe_telephony_hindi_140k.safetensors | Generator at step 140k. Latest; recommended. |
apbwe_telephony_hindi_105k.safetensors | Generator at step 105k. Best checkpoint measured with the ground-truth word test. |
config.json | AP-BWE model config. Needed to load either checkpoint. |
code/bwe.py | Inference engine: original-band reinsertion (STFT crossover), cutoff detection and "F" high-band EQ. |
code/upscale.py | Command-line tool: one file or a whole folder → 24 kHz WAV. |
training/ | Scripts used to build the training pairs, fine-tune and evaluate. For reference; adjust the paths to your setup. |
Usage
git clone https://github.com/yxlu-0102/AP-BWE third_party/AP-BWE # model code (MIT)
pip install torch torchaudio soundfile numpy safetensors
hf download Voxket/apbwe-telephony-hindi --local-dir apbwe-telephony-hindi
cd apbwe-telephony-hindi
APBWE_DIR=../third_party/AP-BWE python code/upscale.py calls_8k/ calls_24k/ --shape F
In Python:
from bwe import APBWE # code/bwe.py; set APBWE_DIR to the AP-BWE clone
m = APBWE("apbwe_telephony_hindi_140k.safetensors", shape="F") # reinsert=True (default) keeps the original voice band
y48 = m(wav, sr) # numpy float32 mono in, 48 kHz numpy out
Signal path: input → 8 kHz → 48 kHz → AP-BWE predicts magnitude and phase spectra → crossover (original below the measured cutoff, model above, magnitude blend) → "F" EQ on the generated band → resample to 24 kHz.
"F" EQ preset: +12 dB "bridge" boost just above the cutoff (to about 4.5 kHz), +5 dB from 4.5 to 6.5 kHz, then a fade-out from 6.5 to 9 kHz. It was chosen by listening tests over the raw model output and the milder presets D and E.
Training
- Base: the released AP-BWE 8k→48k weights (warm start).
- Clean targets: 26,604 studio-quality Hindi recordings at 48 kHz, from AI4Bharat Rasa and IndicVoices-R (both CC-BY-4.0).
- Degraded inputs (3 per clean clip): each was made to sound like real call recordings.
- Resampled to 8 kHz.
- Low-passed at 2.75–3.15 kHz (elliptic filter, order 5–7), matched to the measured spectrum of the calls.
- Telephone line noise added before the filter.
- One codec: MP3 at 8 or 16 kbps (most often), AAC, AMR-NB, GSM or G.711 μ-law.
- During training, an extra random low-pass at 2.55–3.0 kHz was applied half the time.
- Settings:
- Batch size 16, learning rate 1e-4 (AdamW, β = 0.8 / 0.99), decay 0.999.
- Segment 8,000 samples, n_fft 1024, hop 80, window 320.
- ConvNeXt with 512 channels and 8 layers.
- One A100 80 GB.
- Run: steps 60k → 140k on matched data. An earlier run (0–60k) used too high a cutoff and was replaced. Training was stopped at about 142k of 150k.
Evaluation
-
High band: on held-out Hindi, the added 4–12 kHz band is about 10 dB away from real speech (log-spectral distance), against 16–18 dB for phone audio or untuned AP-BWE.
-
Word accuracy: Whisper character error rate against the known text of held-out clean Hindi.
Version Mean CER Median CER Phone-quality input 12.0% 5.2% Untuned AP-BWE 10.9% 5.2% Fine-tuned 75k 18.0% 9.1% Fine-tuned 105k 14.7% 8.9% Fine-tuned 105k + F — 8.8% The added highs aren't perfectly accurate, and Whisper reads them slightly worse than plain phone audio. This improved with training steps. The 140k checkpoint wasn't measured with this test.
Limitations
- Low-bitrate MP3 calls smear word endings into a robotic, small-room echo. This model doesn't remove it; adding highs can make it more audible. Removing it needs a change to the voice band itself, which this model deliberately doesn't touch.
- It was tuned for Hindi call-centre audio with a cutoff around 3 kHz. Other languages and wideband (16 kHz) input aren't tested.
- The output isn't true studio audio: the high band is predicted, not recovered.
Licence and credits
- These weights: CC BY-NC 4.0. Free for research and other non-commercial use, with credit to Voxket. For commercial use, contact Voxket.
- Code in
code/andtraining/: MIT. - Base model: AP-BWE, © 2023 Ye-Xin Lu, MIT licence (copy in
LICENSE-AP-BWE). - Fine-tuning data: AI4Bharat Rasa and IndicVoices-R, CC-BY-4.0.
- Fine-tuned by Voxket, November 2026.