--- title: Voice Target Slider emoji: 🎙️ colorFrom: purple colorTo: pink sdk: gradio sdk_version: "5.47.2" python_version: "3.10" app_file: app.py pinned: false --- # Voice Target Slider A voice analysis tool for **gender-affirming voice therapy**. Upload a reference speaker's voice ("target") to see where it lands on five acoustic dimensions, then record your own voice to compare. ## Five Dimensions | Slider | What it measures | Acoustic proxy | 0 end | 100 end | |--------|-----------------|----------------|-------|---------| | **Pitch** | Fundamental frequency | Median F0 (Hz) | Low | High | | **Weight** | Vocal fold mass / breathiness | H1−H2 (dB) | Heavy | Light | | **Resonance** | Vocal tract brightness | F2 − F1 (Hz) | Dark | Bright | | **Prosody** | Melodic variation | F0 SD (semitones) | Monotone | Bouncy | | **Volume** | Loudness | RMS (dBFS), inverted | Loud | Soft | ## Workflow 1. **(Optional)** Set a personal baseline in Settings to map sliders relative to your own voice 2. **Target tab** — Upload or record a reference voice → click **Analyze Target** 3. **Your Voice tab** — Read the Rainbow Passage (or another prompt) → click **Analyze Recording** 4. Compare your sliders to the target. The **Delta** row shows the difference. 5. Use **Live mode** for continuous real-time feedback while practicing ## Mapping Modes - **Global** — Broad default distributions for slider mapping - **Anchored (literature)** — Uses wider speaking-range anchors from voice research literature - **Baseline (personal)** — Maps slider positions relative to your own baseline recording ## Run Locally ```bash pip install -r requirements.txt python app.py ``` ## Deploy to Hugging Face Spaces 1. Create a new Space → select **Gradio** SDK 2. Upload `app.py`, `requirements.txt`, and this `README.md` 3. The Space starts automatically ## Exports The app writes session data inside the container runtime: - `exports/profile.json` — Latest analysis snapshot - `exports/history.csv` — Full session history - `exports/baseline.json` — Baseline mapping (if created) ## Notes & Limitations - Metrics are sensitive to microphone quality, distance, room noise, and speaking task - H1−H2 and formant estimates can be unstable for some recordings; the app includes robustness checks but is not clinical instrumentation - For best results, speak continuously for 10+ seconds and use a quiet environment - The Rainbow Passage is included as a standard reading prompt used in clinical voice assessment