Skip to content

Evaluation scripts for the Open TTS Leaderboard: https://huggingface.co/spaces/hf-audio/open_tts_leaderboard

Python

Phonon: add the French, German and Spanish 40M models (#23)

Davea8c551cbc155
diff --git a/phonon/run_eval.py b/phonon/run_eval.py
index 5d4e627..3ac95c2 100644
--- a/phonon/run_eval.py
+++ b/phonon/run_eval.py
@@ -37,6 +37,9 @@ from run_eval_utils import (
MODEL_REVISIONS = {
"gradium/phonon-31m-en": "92741c5b07d085ff840e26fea8ce43110b87852f",
"gradium/phonon-40m-en": "cc738b7e4d182c2ba1bafb8062aa4846af000637",
+ "gradium/phonon-40m-fr": "d91086970206b88efd2c88ca971d0628b5968f0f",
+ "gradium/phonon-40m-de": "79cfc7b47fcfc0b666657b981eb366415023a862",
+ "gradium/phonon-40m-es": "f0d2f39c9b58ad4c19a189e3ba989ee4df393cc5",
}
@@ -378,8 +381,10 @@ def run_ttfa(args, checkpoint, distribution, hashes, runtime_hashes, quality_roo
def main(args):
- if args.device != "cpu" or args.split != "en":
- raise ValueError("This q8_0 path supports English CPU only; A100/CUDA TTFA is unavailable.")
+ if args.device != "cpu" or args.split not in ("en", "fr", "de", "es"):
+ raise ValueError("This q8_0 path supports English, French, German and Spanish on CPU only.")
+ if args.ttfa_probe and args.split != "en":
+ raise ValueError("TTFA measures the English split only; A100/CUDA TTFA is unavailable.")
if getattr(args, "ttfa_mode", "blocking") not in ("blocking", "streaming"):
raise ValueError("Select blocking or streaming TTFA explicitly.")
if args.ttfa_probe and (getattr(args, "ttfa_flavor", "cpu-upgrade") != "cpu-upgrade"
diff --git a/phonon/submit_jobs.sh b/phonon/submit_jobs.sh
index 15ef903..63698d4 100644
--- a/phonon/submit_jobs.sh
+++ b/phonon/submit_jobs.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# English, fixed voice. Usage: bash phonon/submit_jobs.sh [model_id ...]
+# English, French, German and Spanish, fixed voice. Usage: bash phonon/submit_jobs.sh [model_id ...]
set -euo pipefail
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/scripts/tts_jobs_common.sh"
@@ -12,7 +12,8 @@ STAGE_RETRIES=0
# h200 would sit idle. Its RTFx is therefore a CPU number, not directly comparable with the h200 models.
FLAVOR=cpu-upgrade
PHONON_THREADS="${PHONON_THREADS:-1}"
-supports_language() { [[ "$1" == en ]]; }
+# Each checkpoint speaks one language, the suffix of its name (gradium/phonon-40m-fr: fr).
+supports_language() { [[ "${MODEL_ID##*-}" == "$1" ]]; }
generate_stage() {
local revision="${PHONON_SEED_DATASET_REVISION:-}" runner command
@@ -40,10 +41,16 @@ generate_stage() {
DATASET_CONFIGS=(
"tts en en"
"zero_shot en en ${CV3_EVAL_PATH}"
+ "zero_shot fr fr ${CV3_EVAL_PATH}"
+ "zero_shot de de ${CV3_EVAL_PATH}"
+ "zero_shot es es ${CV3_EVAL_PATH}"
)
MODEL_CONFIGS=(
"gradium/phonon-31m-en"
"gradium/phonon-40m-en"
+ "gradium/phonon-40m-fr"
+ "gradium/phonon-40m-de"
+ "gradium/phonon-40m-es"
)
[[ $# -eq 0 ]] || MODEL_CONFIGS=("$@")
@@ -54,7 +61,10 @@ done
[[ "$PHONON_THREADS" =~ ^[1-8]$ ]] || fail "Use 1–8 CPU threads."
[[ "$VOICE_CLONE" == false ]] || fail "Voice cloning is unsupported."
for model in "${MODEL_CONFIGS[@]}"; do
- [[ "$model" == gradium/phonon-31m-en || "$model" == gradium/phonon-40m-en ]] || fail "Select a released English checkpoint."
+ case "$model" in
+ gradium/phonon-31m-en|gradium/phonon-40m-en|gradium/phonon-40m-fr|gradium/phonon-40m-de|gradium/phonon-40m-es) ;;
+ *) fail "Select a released checkpoint." ;;
+ esac
done
case "${STAGES:-$DEFAULT_STAGES}" in
generate|"generate transcribe"|"generate transcribe utmos"|transcribe|utmos|"transcribe utmos") ;;