diff --git a/apps/desktop/src/app/settings/constants.ts b/apps/desktop/src/app/settings/constants.ts index 2eecd030b0e0..474a294d27db 100644 --- a/apps/desktop/src/app/settings/constants.ts +++ b/apps/desktop/src/app/settings/constants.ts @@ -384,7 +384,13 @@ export const FIELD_LABELS: Record = defineFieldCopy({ }, xai: { voiceId: 'xAI (Grok) Voice', - language: 'xAI Language' + language: 'xAI Language', + speed: 'Playback Speed', + autoSpeechTags: 'Auto Speech Tags', + textNormalization: 'Text Normalization', + optimizeStreamingLatency: 'Streaming Latency Optimization', + sampleRate: 'Sample Rate', + bitRate: 'Bit Rate' }, minimax: { model: 'MiniMax TTS Model', @@ -491,7 +497,13 @@ export const FIELD_DESCRIPTIONS: Record = defineFieldCopy({ tts: { xai: { voiceId: 'xAI voice ID (e.g. eve) or a custom voice ID.', - language: 'Spoken language code, e.g. en.' + language: 'Spoken language code (e.g. en, pt-BR) or "auto" for auto-detection.', + speed: 'Playback speed. 0.7 = slower, 1.0 = normal, 1.5 = faster.', + autoSpeechTags: 'Let an LLM insert expressive audio tags ([laughing], [sighs]) into the script before synthesis.', + textNormalization: 'Convert numbers, abbreviations, and symbols to spoken form before synthesis.', + optimizeStreamingLatency: 'Latency vs. quality trade-off. 0 = best quality, 2 = lowest latency.', + sampleRate: 'Audio sample rate in Hz. Higher = better quality, larger files.', + bitRate: 'MP3 bitrate in bps. Only applies when codec is mp3.' }, neutts: { device: 'Local inference device for NeuTTS.' @@ -592,6 +604,12 @@ export const SECTIONS: DesktopConfigSection[] = [ 'tts.elevenlabs.model_id', 'tts.xai.voice_id', 'tts.xai.language', + 'tts.xai.speed', + 'tts.xai.auto_speech_tags', + 'tts.xai.text_normalization', + 'tts.xai.optimize_streaming_latency', + 'tts.xai.sample_rate', + 'tts.xai.bit_rate', 'tts.minimax.model', 'tts.minimax.voice_id', 'tts.mistral.model', diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.ts index 0f781c0d330d..801936738328 100644 --- a/apps/desktop/src/i18n/ja.ts +++ b/apps/desktop/src/i18n/ja.ts @@ -465,7 +465,13 @@ export const ja = defineLocale({ }, xai: { voiceId: 'xAI (Grok) 音声', - language: 'xAI 言語' + language: 'xAI 言語', + speed: '再生速度', + autoSpeechTags: '自動音声タグ', + textNormalization: 'テキスト正規化', + optimizeStreamingLatency: 'ストリーミング遅延最適化', + sampleRate: 'サンプルレート', + bitRate: 'ビットレート' }, minimax: { model: 'MiniMax TTS モデル', diff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.ts index c6226c161b50..72d43a3b2c24 100644 --- a/apps/desktop/src/i18n/zh-hant.ts +++ b/apps/desktop/src/i18n/zh-hant.ts @@ -454,7 +454,13 @@ export const zhHant = defineLocale({ }, xai: { voiceId: 'xAI (Grok) 語音', - language: 'xAI 語言' + language: 'xAI 語言', + speed: '播放速度', + autoSpeechTags: '自動語音標籤', + textNormalization: '文字正規化', + optimizeStreamingLatency: '串流延遲最佳化', + sampleRate: '取樣率', + bitRate: '位元率' }, minimax: { model: 'MiniMax TTS 模型', diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts index 8c406b1ea377..ec8b2ec58b83 100644 --- a/apps/desktop/src/i18n/zh.ts +++ b/apps/desktop/src/i18n/zh.ts @@ -565,7 +565,13 @@ export const zh: Translations = { }, xai: { voiceId: 'xAI (Grok) 语音', - language: 'xAI 语言' + language: 'xAI 语言', + speed: '播放速度', + autoSpeechTags: '自动语音标签', + textNormalization: '文本规范化', + optimizeStreamingLatency: '流式延迟优化', + sampleRate: '采样率', + bitRate: '比特率' }, minimax: { model: 'MiniMax TTS 模型', diff --git a/hermes_cli/config.py b/hermes_cli/config.py index 5daacb23223f..4a01be9275cb 100644 --- a/hermes_cli/config.py +++ b/hermes_cli/config.py @@ -2184,9 +2184,13 @@ DEFAULT_CONFIG = { }, "xai": { "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, + "language": "en", # BCP-47 code ("en", "pt-BR") or "auto" + "speed": 1.0, # 0.7–1.5, playback speed + "auto_speech_tags": False, # insert expressive audio tags via LLM rewrite + "text_normalization": False, # normalize numbers/abbreviations/symbols to spoken form + "optimize_streaming_latency": 0, # 0–2, trades quality for lower latency + "sample_rate": 24000, # 22050 / 24000 / 44100 / 48000 + "bit_rate": 128000, # MP3 bitrate; only applies when codec=mp3 }, "mistral": { "model": "voxtral-mini-tts-2603", diff --git a/hermes_cli/web_server.py b/hermes_cli/web_server.py index 63412e98f0db..ac52bc91ed7b 100644 --- a/hermes_cli/web_server.py +++ b/hermes_cli/web_server.py @@ -668,7 +668,7 @@ _SCHEMA_OVERRIDES: Dict[str, Dict[str, Any]] = { "tts.provider": { "type": "select", "description": "Text-to-speech provider", - "options": ["edge", "elevenlabs", "openai", "neutts"], + "options": ["edge", "elevenlabs", "openai", "xai", "minimax", "mistral", "gemini", "neutts", "kittentts", "piper"], }, "stt.provider": { "type": "select",