Override CambTTSSettings.voice type from str to int to match Camb.ai's integer voice IDs
This commit is contained in:
@@ -96,9 +96,11 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
await task.queue_frames([LLMRunFrame()])
|
||||
|
||||
await asyncio.sleep(10)
|
||||
logger.info("Updating Camb TTS settings: language -> Spanish")
|
||||
logger.info("Updating Camb TTS settings: language -> Spanish, voice -> Pirate Captain")
|
||||
await task.queue_frame(
|
||||
TTSUpdateSettingsFrame(delta=CambTTSService.Settings(language=Language.ES))
|
||||
TTSUpdateSettingsFrame(
|
||||
delta=CambTTSService.Settings(language=Language.ES, voice=147319)
|
||||
)
|
||||
)
|
||||
|
||||
@transport.event_handler("on_client_disconnected")
|
||||
|
||||
@@ -138,10 +138,13 @@ class CambTTSSettings(TTSSettings):
|
||||
"""Settings for CambTTSService.
|
||||
|
||||
Parameters:
|
||||
voice: Camb.ai voice ID. Overrides ``TTSSettings.voice`` (str) because
|
||||
Camb.ai uses integer voice IDs.
|
||||
user_instructions: Custom instructions for mars-instruct model only.
|
||||
Ignored for other models. Max 1000 characters.
|
||||
"""
|
||||
|
||||
voice: int | _NotGiven = field(default_factory=lambda: NOT_GIVEN)
|
||||
user_instructions: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user