Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

Commit 289df32

Browse files
NeonJarbasJarbasAl
andauthored
feat/available_languages (#9)
add available_languages endpoint from MycroftAI/mycroft-core#3059 improve lang configs metadata, add display_name Co-authored-by: jarbasai <jarbasai@mailfence.com>
1 parent fceb1f2 commit 289df32

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

ovos_tts_plugin_mimic2/__init__.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ def viseme(self, phonemes):
9999
visemes.append((vis, vis_dur))
100100
return visemes
101101

102+
@property
103+
def available_languages(self) -> set:
104+
"""Return languages supported by this TTS implementation in this state
105+
This property should be overridden by the derived class to advertise
106+
what languages that engine supports.
107+
Returns:
108+
set: supported languages
109+
"""
110+
return set(Mimic2TTSPluginConfig.keys())
111+
102112
# below are helpers to split sentence in chunks that tacotron can synth
103113
# there is a limit for 150 chars
104114
def _preprocess_sentence(self, sentence):
@@ -246,8 +256,8 @@ def get_tts_class(self):
246256

247257
Mimic2TTSPluginConfig = {
248258
"en-us": [
249-
{"voice": "kusal", "gender": "male"},
250-
{"voice": "nancy", "gender": "female"},
251-
{"voice": "ljspeech", "gender": "female"}
259+
{"voice": "kusal", "gender": "male", "display_name": "Kusal"},
260+
{"voice": "nancy", "gender": "female", "display_name": "Nancy"},
261+
{"voice": "ljspeech", "gender": "female", "display_name": "LJSpeech"}
252262
]
253263
}

0 commit comments

Comments
 (0)