-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Problem
The TTS synthesizer wrappers in agent_cli/services/tts.py are thin wrappers that only add **_kwargs to absorb unused config arguments:
async def _synthesize_speech_gemini(
*,
text: str,
gemini_tts_cfg: config.GeminiTTS,
logger: logging.Logger,
**_kwargs: object,
) -> bytes | None:
"""Synthesize speech from text using Gemini TTS."""
return await synthesize_speech_gemini(text=text, gemini_tts_cfg=gemini_tts_cfg, logger=logger)This exists because the caller passes all TTS configs:
audio_data = await synthesizer(
text=text,
wyoming_tts_cfg=wyoming_tts_cfg,
openai_tts_cfg=openai_tts_cfg,
kokoro_tts_cfg=kokoro_tts_cfg,
gemini_tts_cfg=gemini_tts_cfg,
logger=logger,
)Proposal
Add **_kwargs directly to the base functions in services/__init__.py and call them directly, removing the wrapper indirection.
Applies to:
_synthesize_speech_gemini→synthesize_speech_gemini_synthesize_speech_openai→synthesize_speech_openai
Benefits
- Fewer indirections
- Follows "keep it DRY" and "simplest solution" principles
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels