1414 - 140+ languages supported
1515 - Real-time HTTP streaming
1616 - 24kHz audio output
17- - Voice customization (speed, instructions)
17+ - Voice customization (instructions for mars-instruct )
1818"""
1919
2020import asyncio
@@ -129,8 +129,7 @@ class CambTTSService(TTSService):
129129 """Camb.ai MARS HTTP-based text-to-speech service.
130130
131131 Converts text to speech using Camb.ai's MARS TTS models with support for
132- multiple languages. Provides control over voice characteristics like speed
133- and custom instructions (for mars-instruct model).
132+ multiple languages. Provides custom instructions support for the mars-instruct model.
134133
135134 Example::
136135
@@ -140,8 +139,7 @@ class CambTTSService(TTSService):
140139 model="mars-flash",
141140 aiohttp_session=session,
142141 params=CambTTSService.InputParams(
143- language=Language.EN,
144- speed=1.0
142+ language=Language.EN
145143 )
146144 )
147145
@@ -163,13 +161,11 @@ class InputParams(BaseModel):
163161
164162 Parameters:
165163 language: Language for synthesis (BCP-47 format). Defaults to English.
166- speed: Speech speed multiplier (0.5 to 2.0). Defaults to 1.0.
167164 user_instructions: Custom instructions for mars-instruct model only.
168165 Ignored for other models. Max 1000 characters.
169166 """
170167
171168 language : Optional [Language ] = Language .EN
172- speed : Optional [float ] = Field (default = 1.0 , ge = 0.5 , le = 2.0 )
173169 user_instructions : Optional [str ] = Field (
174170 default = None ,
175171 max_length = 1000 ,
@@ -223,7 +219,6 @@ def __init__(
223219 if params .language
224220 else DEFAULT_LANGUAGE
225221 ),
226- "speed" : params .speed or 1.0 ,
227222 "user_instructions" : params .user_instructions ,
228223 }
229224
@@ -312,7 +307,6 @@ async def run_tts(self, text: str) -> AsyncGenerator[Frame, None]:
312307 "language" : self ._settings ["language" ],
313308 "speech_model" : self ._model_name ,
314309 "output_configuration" : {"format" : "pcm_s16le" },
315- "voice_settings" : {"speed" : self ._settings ["speed" ]},
316310 }
317311
318312 # Add user instructions if using mars-instruct model
0 commit comments