Skip to content

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

Python

Phonon: add the Portuguese 40M model (#29)

Davedcb961ee483a
diff --git a/phonon/run_eval.py b/phonon/run_eval.py
index c60a885..b969bc8 100644
--- a/phonon/run_eval.py
+++ b/phonon/run_eval.py
@@ -44,12 +44,13 @@ MODEL_REVISIONS = {
"gradium/phonon-40m-fr": "d91086970206b88efd2c88ca971d0628b5968f0f",
"gradium/phonon-40m-de": "79cfc7b47fcfc0b666657b981eb366415023a862",
"gradium/phonon-40m-es": "e5e052b26e31abd5918ade71d3135e69d51a66f8",
+ "gradium/phonon-40m-pt": "4cbfd742a1555d60eb5399c6d296e9f2e07389e9",
}
# Voice cloning: voices/<SHA-256 of a reference clip>.safetensors holds that clip's speaker latents,
# and index.json maps "<dataset>/<config>/<split>" to {row id: SHA-256}.
CLONE_VOICES_REPO = "gradium/phonon-leaderboard-clone-voices"
-CLONE_VOICES_REVISION = "3f2a9ece98f4296c57db4f797591a9e021ee11a9"
+CLONE_VOICES_REVISION = "b394ef2baf1d8db9c695bdc9acb0cb1693eff005"
def file_hash(path):
@@ -410,8 +411,8 @@ def load_clone_voices(args):
def main(args):
if args.voice_clone and (args.ttfa_probe or args.voice != "default"):
raise ValueError("Voice cloning replaces the preset voice and has no TTFA path.")
- 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.device != "cpu" or args.split not in ("en", "fr", "de", "es", "pt"):
+ raise ValueError("This q8_0 path supports English, French, German, Spanish and Portuguese 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"):
diff --git a/phonon/submit_jobs.sh b/phonon/submit_jobs.sh
index 17334c8..9ab0529 100644
--- a/phonon/submit_jobs.sh
+++ b/phonon/submit_jobs.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# English, French, German and Spanish, fixed voice or, with VOICE_CLONE=true, voice cloning.
+# English, French, German, Spanish and Portuguese, fixed voice or, with VOICE_CLONE=true, voice cloning.
# Usage: bash phonon/submit_jobs.sh [model_id ...]
set -euo pipefail
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/scripts/tts_jobs_common.sh"
@@ -48,6 +48,7 @@ DATASET_CONFIGS=(
"tts fr fr ${MINIMAX_EVAL_PATH}"
"tts de de ${MINIMAX_EVAL_PATH}"
"tts es es ${MINIMAX_EVAL_PATH}"
+ "tts pt pt ${MINIMAX_EVAL_PATH}"
"zero_shot fr fr ${CV3_EVAL_PATH}"
"zero_shot de de ${CV3_EVAL_PATH}"
"zero_shot es es ${CV3_EVAL_PATH}"
@@ -58,6 +59,7 @@ MODEL_CONFIGS=(
"gradium/phonon-40m-fr"
"gradium/phonon-40m-de"
"gradium/phonon-40m-es"
+ "gradium/phonon-40m-pt"
)
[[ $# -eq 0 ]] || MODEL_CONFIGS=("$@")
@@ -68,7 +70,7 @@ done
[[ "$PHONON_THREADS" =~ ^[1-8]$ ]] || fail "Use 1–8 CPU threads."
for model in "${MODEL_CONFIGS[@]}"; do
case "$model" in
- gradium/phonon-31m-en|gradium/phonon-40m-en|gradium/phonon-40m-fr|gradium/phonon-40m-de|gradium/phonon-40m-es) ;;
+ gradium/phonon-31m-en|gradium/phonon-40m-en|gradium/phonon-40m-fr|gradium/phonon-40m-de|gradium/phonon-40m-es|gradium/phonon-40m-pt) ;;
*) fail "Select a released checkpoint." ;;
esac
done