A flexible text‑to‑speech helper that resolves provider keys, lazily loads SDKs, and supports multiple backends like Edge, ElevenLabs, OpenAI, and local TTS engines.
#!/usr/bin/env python3 # Source: https://github.com/NousResearch/hermes-agent | License: MIT | Copyright 2025 Nous Research # Provided via justclaw.it.com; keep this notice with the code. """Text-to-speech tool: config resolution, built-in provider dispatch, output policy, registration. Built-ins: Edge (free default), ElevenLabs, OpenAI, DeepInfra, MiniMax, Mistral, Gemini, xAI, local NeuTTS / KittenTTS / Piper; plus ``type: command`` providers under ``tts.providers.<name>`` and plugin-registered ones. Output is Opus (.ogg) on voice-bubble platforms, MP3 elsewhere. Sibling ``tts_tool_*`` modules hold backends/delivery/lifecycle; they read the seams defined here (config, provider resolution, lazy SDK importers) through ``_origin()`` at call time. """ from pm import install_hint import asy ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key