Skip to content

feat(tts): xAI Custom Voices — voice cloning support#18776

Merged
alt-glitch merged 1 commit into
mainfrom
feat/xai-custom-voices
May 2, 2026
Merged

feat(tts): xAI Custom Voices — voice cloning support#18776
alt-glitch merged 1 commit into
mainfrom
feat/xai-custom-voices

Conversation

@alt-glitch

Copy link
Copy Markdown
Collaborator

Summary

Add support for xAI Custom Voices — clone your voice from a 30-120s recording and use it with Hermes TTS.

Custom voice IDs slot directly into the existing tts.xai.voice_id config field. No changes to the TTS generation pipeline were needed — it already accepts arbitrary voice IDs.

What's New

API Client (tools/xai_custom_voices.py)

Full Python client for the xAI Custom Voices REST API:

  • list_custom_voices() — paginated listing of team voices
  • get_custom_voice(voice_id) — single voice metadata
  • create_custom_voice(file_path, **metadata) — create from reference audio (Enterprise-only via API)
  • update_custom_voice(voice_id, **metadata) — patch metadata fields
  • delete_custom_voice(voice_id) — remove a voice
  • download_custom_voice_audio(voice_id, output_path) — download reference clip
  • list_builtin_voices() — list all 89+ built-in xAI TTS voices

Follows existing patterns: reuses tools.xai_http.hermes_xai_user_agent(), reads XAI_API_KEY via hermes_cli.config.get_env_value(), respects tts.xai.base_url and XAI_BASE_URL env var.

Config and Setup

  • hermes_cli/config.py — comment on tts.xai.voice_id indicating custom voice IDs work
  • hermes_cli/setup.pyhermes tools wizard now prompts for voice_id when xAI TTS is selected, with guidance on built-in vs custom voices and a link to the console

Documentation

  • New "xAI Custom Voices (voice cloning)" section in website/docs/user-guide/features/tts.md
  • Setup flow, recording tips, limits (30 voices/team, US-only excl. Illinois)

Usage

# ~/.hermes/config.yaml
tts:
  provider: xai
  xai:
    voice_id: "nlbqfwie"   # custom voice ID from xAI Console
    language: "en"
  1. Clone your voice at https://console.x.ai/team/default/voice/voice-library
  2. Copy the 8-char voice_id
  3. Set it in config — done. All Hermes TTS replies use your voice.

Tests

28 new tests covering all API functions, validation, error paths. All existing TTS/STT tests unaffected (131 pass).

Relevant Docs

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

🚨 CRITICAL Supply Chain Risk Detected

This PR contains a pattern that has been used in real supply chain attacks. A maintainer must review the flagged code carefully before merging.

🚨 CRITICAL: Install-hook file added or modified

These files can execute code during package installation or interpreter startup.

Files:

hermes_cli/setup.py

Scanner only fires on high-signal indicators: .pth files, base64+exec/eval combos, subprocess with encoded commands, or install-hook files. Low-signal warnings were removed intentionally — if you're seeing this comment, the finding is worth inspecting.

@alt-glitch alt-glitch marked this pull request as ready for review May 2, 2026 10:27
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have tool/tts Text-to-speech and transcription provider/xai xAI (Grok) labels May 2, 2026
@alt-glitch alt-glitch force-pushed the feat/xai-custom-voices branch from 717f101 to 2345726 Compare May 2, 2026 10:33
@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

🚨 CRITICAL Supply Chain Risk Detected

This PR contains a pattern that has been used in real supply chain attacks. A maintainer must review the flagged code carefully before merging.

🚨 CRITICAL: Install-hook file added or modified

These files can execute code during package installation or interpreter startup.

Files:

hermes_cli/setup.py

Scanner only fires on high-signal indicators: .pth files, base64+exec/eval combos, subprocess with encoded commands, or install-hook files. Low-signal warnings were removed intentionally — if you're seeing this comment, the finding is worth inspecting.

Point users to xAI's custom voices feature — clone your voice in the
console, paste the voice_id into tts.xai.voice_id. No code changes
needed; the existing TTS pipeline already handles arbitrary voice IDs.

- config.py: link to xAI custom voices docs in voice_id comment
- setup.py: prompt accepts custom voice IDs during xAI TTS setup
- tts.md: short section linking to xAI console and docs
@alt-glitch alt-glitch force-pushed the feat/xai-custom-voices branch from 2345726 to bae5964 Compare May 2, 2026 10:36
@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

🚨 CRITICAL Supply Chain Risk Detected

This PR contains a pattern that has been used in real supply chain attacks. A maintainer must review the flagged code carefully before merging.

🚨 CRITICAL: Install-hook file added or modified

These files can execute code during package installation or interpreter startup.

Files:

hermes_cli/setup.py

Scanner only fires on high-signal indicators: .pth files, base64+exec/eval combos, subprocess with encoded commands, or install-hook files. Low-signal warnings were removed intentionally — if you're seeing this comment, the finding is worth inspecting.

@alt-glitch alt-glitch merged commit 5d3be89 into main May 2, 2026
9 of 12 checks passed
@alt-glitch alt-glitch deleted the feat/xai-custom-voices branch May 2, 2026 10:38
nickdlkk pushed a commit to nickdlkk/hermes-agent that referenced this pull request May 11, 2026
Point users to xAI's custom voices feature — clone your voice in the
console, paste the voice_id into tts.xai.voice_id. No code changes
needed; the existing TTS pipeline already handles arbitrary voice IDs.

- config.py: link to xAI custom voices docs in voice_id comment
- setup.py: prompt accepts custom voice IDs during xAI TTS setup
- tts.md: short section linking to xAI console and docs
jsboige pushed a commit to jsboige/hermes-agent that referenced this pull request May 14, 2026
Point users to xAI's custom voices feature — clone your voice in the
console, paste the voice_id into tts.xai.voice_id. No code changes
needed; the existing TTS pipeline already handles arbitrary voice IDs.

- config.py: link to xAI custom voices docs in voice_id comment
- setup.py: prompt accepts custom voice IDs during xAI TTS setup
- tts.md: short section linking to xAI console and docs
dannyJ848 pushed a commit to dannyJ848/hermes-agent that referenced this pull request May 17, 2026
Point users to xAI's custom voices feature — clone your voice in the
console, paste the voice_id into tts.xai.voice_id. No code changes
needed; the existing TTS pipeline already handles arbitrary voice IDs.

- config.py: link to xAI custom voices docs in voice_id comment
- setup.py: prompt accepts custom voice IDs during xAI TTS setup
- tts.md: short section linking to xAI console and docs
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
Point users to xAI's custom voices feature — clone your voice in the
console, paste the voice_id into tts.xai.voice_id. No code changes
needed; the existing TTS pipeline already handles arbitrary voice IDs.

- config.py: link to xAI custom voices docs in voice_id comment
- setup.py: prompt accepts custom voice IDs during xAI TTS setup
- tts.md: short section linking to xAI console and docs
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
Point users to xAI's custom voices feature — clone your voice in the
console, paste the voice_id into tts.xai.voice_id. No code changes
needed; the existing TTS pipeline already handles arbitrary voice IDs.

- config.py: link to xAI custom voices docs in voice_id comment
- setup.py: prompt accepts custom voice IDs during xAI TTS setup
- tts.md: short section linking to xAI console and docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have provider/xai xAI (Grok) tool/tts Text-to-speech and transcription type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant