You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Return the list of languages supported by the wrapped TTS engine.
43
+
List languages supported by the wrapped TTS engine.
44
44
45
45
Returns:
46
-
list[str]: Engine-reported available language codes, or a list containing the wrapper's default language if the engine does not expose available languages.
46
+
list[str]: Engine-reported language codes, or a single-item list containing the wrapper's default language if the engine does not provide available languages.
Attempt to retrieve available voices from the plugin.
54
-
Returns a list of dictionaries or strings depending on the plugin.
53
+
Return the available voices exposed by the wrapped TTS engine.
54
+
55
+
A list of available voices — each item is typically a dict or a string depending on the engine implementation. Returns an empty list if the wrapped engine does not expose an `available_voices` attribute.
Synthesize spoken audio from the given text or SSML.
63
+
Synthesize speech audio from the provided text or SSML.
63
64
64
65
Parameters:
65
-
utterance (str): Text or SSML to synthesize.
66
-
kwargs: Plugin-specific synthesis parameters forwarded to the underlying TTS engine.
66
+
utterance (str): Text or SSML to synthesize.
67
+
**kwargs: Plugin-specific synthesis options forwarded to the underlying TTS engine (e.g., lang, voice, format).
67
68
68
69
Returns:
69
-
tuple (str, Optional[str]): `(audio_path, phonemes)` where `audio_path` is the file path to the generated audio and `phonemes` is the phoneme data produced by the engine, or `None` if not available.
70
+
tuple: `(audio_path, phonemes)` where `audio_path` is the file path to the generated audio and `phonemes` is the phoneme data produced by the engine, or `None` if not available.
MaryTTS Compatibility: Returns a newline-separated list of supported locales.
118
-
Format: [locale]\n...
118
+
Provide supported locales in MaryTTS-compatible plain-text format.
119
+
120
+
Returns:
121
+
A plain-text HTTP response whose body contains supported locale identifiers,
122
+
one per line (newline-separated).
119
123
"""
120
124
langs=tts_engine.langs
121
125
# Ensure we return plain text, not JSON
@@ -124,9 +128,12 @@ def mary_locales():
124
128
@app.get("/voices")
125
129
defmary_voices():
126
130
"""
127
-
MaryTTS Compatibility: Returns a list of supported voices.
128
-
Format: [name] [locale] [gender]\n...
129
-
Note: Name must be space-free.
131
+
Provide a MaryTTS-compatible plain-text listing of available voices.
132
+
133
+
Each line has the format: "<name> <locale> <gender>". The generated name must not contain spaces; the response currently emits a single default voice line based on the server's TTS engine.
134
+
135
+
Returns:
136
+
A FastAPI Response with media_type "text/plain" whose body is newline-separated voice entries.
MaryTTS Compatibility: Processes input text and returns a wav file.
142
-
Accepts both GET and POST parameters validated by Pydantic.
148
+
Handle MaryTTS-compatible /process requests and return the synthesized audio as a WAV FileResponse.
149
+
150
+
Maps MaryTTS parameters to TTS engine options (LOCALE → lang, VOICE underscores replaced with spaces) and synthesizes INPUT_TEXT via the injected TTS engine.
151
+
152
+
Parameters:
153
+
params (MaryTTSInput): Validated MaryTTS request parameters injected via Depends(); contains INPUT_TEXT, INPUT_TYPE, LOCALE, VOICE, OUTPUT_TYPE, and AUDIO.
154
+
155
+
Returns:
156
+
FileResponse: A response serving the synthesized audio as a WAV file.
143
157
"""
144
158
# Map MaryTTS specific params to OVOS synthesize params
0 commit comments