Input Data Structure
Prepare an input CSV file with the following structure:| id | text |
|---|---|
| row_1 | hello world |
| row_2 | this is a test |
id (unique identifier for each text) and text (the text strings you want to synthesize into speech).
Running Provider Evaluation
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
input | str | Yes | - | Path to input CSV file containing texts to synthesize |
provider | str | No | ”google” | Text to Speech provider: cartesia, openai, groq, google, elevenlabs, sarvam, smallest |
language | str | No | ”english” | Language: english, hindi, kannada, bengali, malayalam, marathi, odia, punjabi, tamil, telugu, gujarati, sindhi |
output_dir | str | No | ”./out” | Path to output directory for results |
debug | bool | No | False | Run on first N texts only |
debug_count | int | No | 5 | Number of texts in debug mode |
overwrite | bool | No | False | Overwrite existing results instead of resuming from checkpoint |
Output Structure
results.csv
Contains detailed results for each text:| id | text | audio_path | ttfb | llm_judge_score | llm_judge_reasoning |
|---|---|---|---|---|---|
| row_1 | hello world | ./out/elevenlabs/audios/row_1.wav | 1.511 | True | The audio says ‘hello world’ clearly and matches the reference text exactly. |
| row_2 | this is a test | ./out/elevenlabs/audios/row_2.wav | 1.215 | True | The audio clearly says ‘this is a test,’ which matches exactly with the provided reference text. |
metrics.json
Contains aggregated metrics:Metrics
Text to Speech evaluation measures both quality and latency: Quality metrics:- LLM Judge Score: Semantic evaluation of pronunciation accuracy
- TTFB (Time to First Byte): Time until first audio chunk is received
Learn more about metrics
Detailed explanation of all metrics and how LLM Judge works
Provider Leaderboard
After running multiple provider evaluations, generate a combined leaderboard:metrics.json and results.csv, then generates:
tts_leaderboard.xlsx: Excel file with all metrics by provider- Individual metric charts:
llm_judge_score.png,ttfb.png
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
output_dir | str | Yes | - | Directory containing provider evaluation results |
save_dir | str | Yes | - | Directory to save leaderboard files |