From 5d3be898a8671eb9fb99cf18f43165502f54e7f4 Mon Sep 17 00:00:00 2001 From: Siddharth Balyan <52913345+alt-glitch@users.noreply.github.com> Date: Sat, 2 May 2026 16:08:01 +0530 Subject: [PATCH] docs(tts): mention xAI custom voice support (#18776) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- hermes_cli/config.py | 2 +- hermes_cli/setup.py | 7 +++++++ website/docs/user-guide/features/tts.md | 15 ++++++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/hermes_cli/config.py b/hermes_cli/config.py index 17e10c08..9e7ff889 100644 --- a/hermes_cli/config.py +++ b/hermes_cli/config.py @@ -830,7 +830,7 @@ DEFAULT_CONFIG = { # Voices: alloy, echo, fable, onyx, nova, shimmer }, "xai": { - "voice_id": "eve", + "voice_id": "eve", # or custom voice ID — see https://docs.x.ai/developers/model-capabilities/audio/custom-voices "language": "en", "sample_rate": 24000, "bit_rate": 128000, diff --git a/hermes_cli/setup.py b/hermes_cli/setup.py index 8f32e2cb..31cb8460 100644 --- a/hermes_cli/setup.py +++ b/hermes_cli/setup.py @@ -1190,6 +1190,13 @@ def _setup_tts_provider(config: dict): "Falling back to Edge TTS." ) selected = "edge" + if selected == "xai": + print() + voice_id = prompt("xAI voice_id (Enter for 'eve', or paste a custom voice ID)") + if voice_id and voice_id.strip(): + config.setdefault("tts", {}).setdefault("xai", {})["voice_id"] = voice_id.strip() + print_success(f"xAI voice_id set to: {voice_id.strip()}") + elif selected == "minimax": existing = get_env_value("MINIMAX_API_KEY") diff --git a/website/docs/user-guide/features/tts.md b/website/docs/user-guide/features/tts.md index fa632a83..14d44daa 100644 --- a/website/docs/user-guide/features/tts.md +++ b/website/docs/user-guide/features/tts.md @@ -69,7 +69,7 @@ tts: model: "gemini-2.5-flash-preview-tts" # or gemini-2.5-pro-preview-tts voice: "Kore" # 30 prebuilt voices: Zephyr, Puck, Kore, Enceladus, Gacrux, etc. xai: - voice_id: "eve" # xAI TTS voice (see https://docs.x.ai/docs/api-reference#tts) + voice_id: "eve" # or a custom voice ID — see docs below language: "en" # ISO 639-1 code sample_rate: 24000 # 22050 / 24000 (default) / 44100 / 48000 bit_rate: 128000 # MP3 bitrate; only applies when codec=mp3 @@ -127,6 +127,19 @@ Without ffmpeg, Edge TTS, MiniMax TTS, NeuTTS, KittenTTS, and Piper audio are se If you want voice bubbles without installing ffmpeg, switch to the OpenAI, ElevenLabs, or Mistral provider. ::: +### xAI Custom Voices (voice cloning) + +xAI supports cloning your voice and using it with TTS. Create a custom voice in the [xAI Console](https://console.x.ai/team/default/voice/voice-library), then set the resulting `voice_id` in your config: + +```yaml +tts: + provider: xai + xai: + voice_id: "nlbqfwie" # your custom voice ID +``` + +See the [xAI Custom Voices docs](https://docs.x.ai/developers/model-capabilities/audio/custom-voices) for details on recording, supported formats, and limits. + ### Piper (local, 44 languages) Piper is a fast, local neural TTS engine from the Open Home Foundation (the Home Assistant maintainers). It runs entirely on CPU, supports **44 languages** with pre-trained voices, and needs no API key.