Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Dec 15, 2024
1 parent be7b4ea commit f379f08
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ovos_tts_plugin_piper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, config=None):
self.noise_w = self.config.get("noise-w") # Phoneme width noise

# pre-load models
preload_voices = self.config.get("preload_voices") or []
preload_voices = self.config.get("preload_voices") or [self.voice]
preload_langs = self.config.get("preload_langs") or []

for lang in preload_langs:
Expand Down Expand Up @@ -177,4 +177,13 @@ def available_languages(self) -> set:
}
e = PiperTTSPlugin(config=config)
e.get_tts("hello world", "hello.wav")
print(PiperTTSPluginConfig)

# test all voices
for lang, voices in PiperTTSPluginConfig.items():
for voice in voices:
v = list(voice.keys())[0]
print(lang, v)
e = PiperTTSPlugin(config={"voice": v, "lang": lang})
e.get_tts("test 1 2 3", f"{lang}_{v}.wav",
voice=v, lang=lang)

0 comments on commit f379f08

Please sign in to comment.