# SoMer Demo (Minimal)

This is a tiny Gradio app so people can type their own sentence and listen to SoMer TTS.

## What it provides

- Text input
- Speaker dropdown:
  - `speaker_f01`
  - `speaker_m01`
  - `speaker_m02`
  - `speaker_marylux_f`
- Model dropdown: `base` or `lora`
- WAV audio output

## Run on cluster

Use the OmniVoice environment:

```bash
module load env/staging/2023.1 CUDA/12.3.2
CONDA_BASE=/project/home/p200540/u102063_restore_bis_6731/u102063_restore/miniconda3
export PATH=$CONDA_BASE/envs/qwen3-tts-luxembourgish/bin:$PATH
export LD_LIBRARY_PATH=$CONDA_BASE/envs/qwen3-tts-luxembourgish/lib:${LD_LIBRARY_PATH:-}
cd /project/home/p200540/u102063_restore_bis_6731/u102063_restore/u102063/N-hk/luxvoice-page/somer
python app_gradio.py --host 0.0.0.0 --port 7860
```

## Access from laptop

```bash
ssh -L 7860:localhost:7860 <cluster-login>
```

Then open: `http://localhost:7860`

## Optional env overrides

- `SOMER_ROOT` (default points to your SoMer folder)
- `SPEAKER_REFS` (default: `$SOMER_ROOT/output/omnivoice/speaker_references.json`)
- `LORA_CHECKPOINT` (default: `$SOMER_ROOT/output/omnivoice/checkpoints/lora/checkpoint-5000`)
- `SOMER_DEVICE` (default: `cuda:0`, falls back to CPU if no GPU)
