mirror of
https://github.com/ggozad/oterm.git
synced 2026-10-09 16:53:20 +02:00
Registers a "speak" capability that reads responses aloud through piper as it streams, backed by pydantic-ai-tts and installed with the oterm[speak] extra. The entry appears in the tool selector only when the package is importable, so a base install pulls neither onnxruntime nor a voice model. The extra carries a python_version >= '3.11' marker because pydantic-ai-tts requires 3.11 while oterm supports 3.10; without it the extra cannot resolve. On 3.10 the package is absent and the capability is simply not registered. The factory is memoised: capabilities are built once per chat and every Speaks owns worker threads the factory contract gives no place to close. It also sets ORT_DISABLE_TELEMETRY before the import, which is where onnxruntime reads it, leaving an explicit setting alone. pydantic-ai-tts is MIT but pulls piper-tts, which is GPL-3.0-or-later, into the environment of anyone installing the extra. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| mcp_servers.py | ||
| test_builtin_tools.py | ||
| test_capabilities.py | ||
| test_discovery.py | ||
| test_mcp_logging.py | ||
| test_mcp_setup.py | ||
| test_ollama_image.py | ||