diff --git a/hermes_cli/config.py b/hermes_cli/config.py index 17e10c08d6..9e7ff8897c 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 8f32e2cbd8..31cb846012 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 fa632a83b4..14d44daa89 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.