hermes-agent/website/docs/user-guide
Teknium 2facea7f71
feat(tts): add command-type provider registry under tts.providers.<name> (#17843)
Reshape of PR #17211 (@versun). Lets users wire any local or external
TTS CLI into Hermes without adding engine-specific Python code. Users
declare any number of named providers in config.yaml and switch between
them with tts.provider: <name>, alongside the built-ins (edge, openai,
elevenlabs, …).

Config shape:

  tts:
    provider: piper-en
    providers:
      piper-en:
        type: command
        command: 'piper -m ~/model.onnx -f {output_path} < {input_path}'
        output_format: wav

Placeholders: {input_path}, {text_path}, {output_path}, {format},
{voice}, {model}, {speed}. Use {{ / }} for literal braces.

Key behavior:
- Built-in provider names always win — a tts.providers.openai entry
  cannot shadow the native OpenAI provider.
- type: command is the default when command: is set.
- Placeholder values are shell-quote-aware (bare / single / double
  context), so paths with spaces and shell metacharacters are safe.
- Default delivery is a regular audio attachment. voice_compatible: true
  opts in to Telegram voice-bubble delivery via ffmpeg Opus conversion.
- Command failures (non-zero exit, timeout, empty output) surface to
  the agent with stderr/stdout included so you can debug from chat.
- Process-tree kill on timeout (Unix killpg, Windows taskkill /T).
- max_text_length defaults to 5000 for command providers; override
  under tts.providers.<name>.max_text_length.

Tests: tests/tools/test_tts_command_providers.py — 42 new tests cover
provider resolution, shell-quote context, placeholder rendering with
injection payloads, timeout, non-zero exit, empty output, voice_compatible
opt-in, and end-to-end dispatch through text_to_speech_tool. All 88
pre-existing TTS tests still pass.

Docs: new "Custom command providers" section in
website/docs/user-guide/features/tts.md with three worked examples
(Piper, VoxCPM, MLX-Kokoro), placeholder reference, optional keys,
behavior notes, and security caveat.

E2E-verified live: isolated HERMES_HOME, command provider declared in
config.yaml, text_to_speech_tool dispatches through the registered
shell command and the output file is produced as expected.

Co-authored-by: Versun <me+github7604@versun.org>
2026-04-30 02:29:08 -07:00
..
features feat(tts): add command-type provider registry under tts.providers.<name> (#17843) 2026-04-30 02:29:08 -07:00
messaging feat(teams): add Microsoft Teams platform adapter as a plugin 2026-04-30 01:19:34 -07:00
skills docs: resync reference, user-guide, developer-guide, and messaging pages against code (#17738) 2026-04-29 20:55:59 -07:00
_category_.json feat: add documentation website (Docusaurus) 2026-03-05 05:24:55 -08:00
checkpoints-and-rollback.md docs: resync reference, user-guide, developer-guide, and messaging pages against code (#17738) 2026-04-29 20:55:59 -07:00
cli.md docs: resync reference, user-guide, developer-guide, and messaging pages against code (#17738) 2026-04-29 20:55:59 -07:00
configuration.md docs: resync reference, user-guide, developer-guide, and messaging pages against code (#17738) 2026-04-29 20:55:59 -07:00
configuring-models.md feat(dashboard): configure main + auxiliary models from Models page (#17802) 2026-04-29 23:53:12 -07:00
docker.md docs: resync reference, user-guide, developer-guide, and messaging pages against code (#17738) 2026-04-29 20:55:59 -07:00
git-worktrees.md docs: restructure site navigation — promote features and platforms to top-level (#4116) 2026-03-30 18:39:51 -07:00
profiles.md docs: resync reference, user-guide, developer-guide, and messaging pages against code (#17738) 2026-04-29 20:55:59 -07:00
security.md docs: resync reference, user-guide, developer-guide, and messaging pages against code (#17738) 2026-04-29 20:55:59 -07:00
sessions.md docs: resync reference, user-guide, developer-guide, and messaging pages against code (#17738) 2026-04-29 20:55:59 -07:00
tui.md docs: two-week gap sweep — platforms, CLI, config, TUI, hooks, providers (#17727) 2026-04-29 20:32:37 -07:00