File size: 1,974 Bytes
cce890f
c9fb504
cce890f
 
 
 
 
 
 
 
 
 
23a8386
 
0ec971f
 
23a8386
0ec971f
 
 
 
 
23a8386
 
0ec971f
 
 
23a8386
0ec971f
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
title: Tool ASR Generate OmniVoice
emoji: 🌍
colorFrom: purple
colorTo: gray
sdk: gradio
sdk_version: 6.22.0
python_version: '3.12'
app_file: app.py
pinned: false
---

# Tool ASR Generate

Batch text-to-speech using [k2-fsa/OmniVoice](https://huggingface.co/k2-fsa/OmniVoice) on a **CPU-only** Space,
focused on **πŸ‡°πŸ‡­ Khmer** and **πŸ‡¬πŸ‡§ English** (OmniVoice itself supports 600+ languages).

Upload a CSV / JSON / XLSX file with a `text` column, set an optional reference voice and
generation settings in the sidebar, click **Generate All**, and download a ZIP with every
generated `.wav` plus a `metadata.csv` / `metadata.json` manifest β€” ready to push to a
Hugging Face Dataset repo. A preview of the first 10 generated rows (text + playable audio)
shows up right after generation.

Each row is auto-detected as English or Khmer (from the script), or set explicitly with a
`language` column β€” this is only used to label the output metadata. Generation itself uses
one shared reference voice (or voice-design instruction) for every row, unless a row sets
its own `voice_description`.

Voice control comes from OmniVoice's two generation modes:
- **Voice cloning** β€” upload a 3–10s reference clip (+ optional transcript, auto-transcribed
  with Whisper if omitted) in the sidebar to clone that voice across every row.
- **Voice design** β€” set a per-row `voice_description` (e.g. `"female, low pitch, british
  accent"`) to describe the voice via attributes instead; this overrides cloning for that row.
- If neither is set, OmniVoice picks a voice automatically ("auto voice" mode).

⚠️ CPU hardware will generate speech more slowly than GPU β€” plan batch sizes accordingly, or
upgrade the Space's hardware tier if you need faster throughput. You can trade quality for
speed with the "Diffusion steps" slider (fewer steps = faster, lower quality).

See `sample_input.csv` for the expected input format (includes example Khmer and English rows).