From 1c6611ec2846b066f317f28fe1cd781b9300d84f Mon Sep 17 00:00:00 2001 From: jarbasai Date: Sat, 18 Mar 2023 00:53:44 +0000 Subject: [PATCH] standardize voice_id --- ovos_plugin_manager/tts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ovos_plugin_manager/tts.py b/ovos_plugin_manager/tts.py index 5068250f..c66a45c4 100644 --- a/ovos_plugin_manager/tts.py +++ b/ovos_plugin_manager/tts.py @@ -9,9 +9,9 @@ def get_voice_id(plugin_name, lang, tts_cfg): - spkr = tts_cfg.get("speaker") or tts_cfg.get("gender") or "default" - name = tts_cfg.get("voice") or tts_cfg.get("model") or "default" - voiceid = f"{plugin_name}_{lang}_{name}_{spkr}.json".replace("/", "_") + skip_keys = ["module"] + keys = sorted([f"{k}_{v}" for k, v in tts_cfg.items() if k not in skip_keys]) + voiceid = f"{plugin_name}_{lang}_{keys}.json".replace("/", "_") return voiceid