Skip to content

Commit

Permalink
standardize voice_id
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Mar 18, 2023
1 parent 3134287 commit 1c6611e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ovos_plugin_manager/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 1c6611e

Please sign in to comment.