From 5aaffc8a2647f0d370564561733249ba50198b60 Mon Sep 17 00:00:00 2001 From: Carlin Hefner Date: Wed, 24 Jul 2024 13:22:00 -0700 Subject: [PATCH] Update default model to Turbo 2.5 and add languages --- README.md | 6 +++--- custom_components/elevenlabs_tts/const.py | 2 +- custom_components/elevenlabs_tts/tts.py | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1937a87..dc5d11c 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ data: voice: Bella stability: 1 similarity: 1 - style: 0.3 #Not supported in Model V1 - use_speaker_boost: "true" #Not supported in Model V1 - model: eleven_multilingual_v1 + style: 0.3 # Only supported in eleven_multilingual_v2 + use_speaker_boost: "true" # Only supported in eleven_multilingual_v2 + model: eleven_multilingual_v2 optimize_streaming_latency: 3 target: entity_id: tts.elevenlabstts diff --git a/custom_components/elevenlabs_tts/const.py b/custom_components/elevenlabs_tts/const.py index 48bd65a..2fd61fc 100644 --- a/custom_components/elevenlabs_tts/const.py +++ b/custom_components/elevenlabs_tts/const.py @@ -19,7 +19,7 @@ CONF_SIMILARITY = "similarity" DEFAULT_SIMILARITY = 0.9 CONF_MODEL = "model" -DEFAULT_MODEL = "eleven_multilingual_v1" +DEFAULT_MODEL = "eleven_turbo_v2_5" CONF_OPTIMIZE_LATENCY = "optimize_streaming_latency" DEFAULT_OPTIMIZE_LATENCY = 0 CONF_STYLE = "style" diff --git a/custom_components/elevenlabs_tts/tts.py b/custom_components/elevenlabs_tts/tts.py index 597c4c2..404b1b2 100644 --- a/custom_components/elevenlabs_tts/tts.py +++ b/custom_components/elevenlabs_tts/tts.py @@ -59,7 +59,7 @@ def default_language(self) -> str: @property def supported_languages(self) -> list[str]: """Return list of supported languages.""" - # This is for eleven_multilingual_v2, not all are supported in other models + # This is for eleven_turbo_v2_5, not all are supported in other models return [ "en", # English "ja", # Japanese @@ -89,6 +89,9 @@ def supported_languages(self) -> list[str]: "da", # Danish "ta", # Tamil "uk", # Ukrainian + "vi", # Vietnamese + "hu", # Hungarian + "no", # Norwegian ] @property