The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(tools): pack tts_tool/speaker signatures (AST-neutral)
Tekniumc1f117970708
diff --git a/tools/tts_tool.py b/tools/tts_tool.pyindex 0dd14e086a0..6cb7252fca0 100644--- a/tools/tts_tool.py+++ b/tools/tts_tool.py@@ -486,14 +486,8 @@ def _tool_failure(prefix: str, provider: str, exc: BaseException) -> str:def _text_to_speech_single(- text: str,- file_str: str,- *,- provider: str,- tts_config: Dict[str, Any],- command_provider_config: Optional[Dict[str, Any]],- want_opus: bool,- instructions: Optional[str],+ text: str, file_str: str, *, provider: str, tts_config: Dict[str, Any],+ command_provider_config: Optional[Dict[str, Any]], want_opus: bool, instructions: Optional[str],) -> str:"""Synthesize one provider-safe text chunk into *file_str* and return one final-encoded file.@@ -580,11 +574,8 @@ def _synthesize_chunks(chunks: List[str], base_path: Path, generated_artifacts:def text_to_speech_tool(- text: str,- output_path: Optional[str] = None,- speed: Optional[float] = None,- instructions: Optional[str] = None,- provider: Optional[str] = None,+ text: str, output_path: Optional[str] = None, speed: Optional[float] = None,+ instructions: Optional[str] = None, provider: Optional[str] = None,) -> str:"""Convert text to speech audio with long-form chunking; returns the JSON result envelope.@@ -628,11 +619,8 @@ def text_to_speech_tool(final_paths: List[str] = []try:encoded_paths, chunk_results = _synthesize_chunks(- chunks, base_path, generated_artifacts,- provider=provider,- tts_config=tts_config,- command_provider_config=command_provider_config,- want_opus=want_opus,+ chunks, base_path, generated_artifacts, provider=provider, tts_config=tts_config,+ command_provider_config=command_provider_config, want_opus=want_opus,instructions=instructions,)voice_compatible = bool(chunk_results) and all(bool(r.get("voice_compatible")) for r in chunk_results)diff --git a/tools/tts_tool_speaker.py b/tools/tts_tool_speaker.pyindex 7edc25a543f..6d7b2fd8c51 100644--- a/tools/tts_tool_speaker.py+++ b/tools/tts_tool_speaker.py@@ -337,11 +337,8 @@ class _StreamerPlayback:def stream_tts_to_speaker(- text_queue: queue.Queue,- stop_event: threading.Event,- tts_done_event: threading.Event,- display_callback: Optional[Callable[[str], None]] = None,- provider: Optional[str] = None,+ text_queue: queue.Queue, stop_event: threading.Event, tts_done_event: threading.Event,+ display_callback: Optional[Callable[[str], None]] = None, provider: Optional[str] = None,):"""Consume text deltas from *text_queue*, cut them into sentences, and speak each onethe moment it's ready — the conversational path.