GAN_BWE / README.md
harshil09's picture
resolved issue
8e1993f verified
|
Raw
History Blame Contribute Delete
2.1 kB
---
title: HybridGAN Speech Bandwidth Extension
emoji: 🎧
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 5.9.0
app_file: app.py
pinned: false
license: mit
---
# 🎧 HybridGAN-BWE: Speech Bandwidth Extension & Telephony Restoration
Band-limited narrowband telecommunication signals (standard landline G.711 codecs, mobile GSM channels, handset microphone cut-offs) restrict speech bandwidth to 300 Hz – 3400 Hz or 0 Hz – 4000 Hz. This severely degrades voice naturalness, intelligibility, and speaker identification.
**HybridGAN-BWE** presents a real-time, parameter-efficient Speech Bandwidth Extension system that reconstructs high-fidelity wideband speech (**16 kHz**) from narrowband input (**8 kHz**).
---
## πŸš€ Key Features
* **Dual-Path Spectral Encoder**: Combines 2D spatial spectrogram convolutions and 1D temporal frame features fused via Multi-Head Cross-Attention.
* **Domain Randomization**: Robust against real-world telephone noise, GSM/G.711 compression, and handset high-pass cut-offs.
* **Parameter Efficient**: Squeezed 2D Spectrogram Discriminators (channels reduced from 32 to 16, saving 67% discriminator parameters).
* **CPU Compatible**: Optimized for CPU inference on Hugging Face Free Tier Spaces.
---
## πŸ“¦ Hugging Face Space Repository Structure
```
.
β”œβ”€β”€ app.py # Main Gradio application entrypoint
β”œβ”€β”€ README.md # Space Metadata & Documentation
β”œβ”€β”€ requirements.txt # Minimal dependencies (PyTorch, Gradio, Librosa)
β”œβ”€β”€ config.yaml # Model configuration parameters
β”œβ”€β”€ best_model.pth # Lightweight Generator model checkpoint
β”œβ”€β”€ models/ # Model generator and discriminator definitions
β”œβ”€β”€ modules/ # Spectral branch, waveform branch, and attention modules
└── utils/ # Config loader utility
```
---
## πŸ› οΈ Local Testing Guide
To test this space locally on your machine:
```bash
cd hf_space
pip install -r requirements.txt
python app.py
```
Open **[http://127.0.0.1:7860](http://127.0.0.1:7860)** in your browser.