feat: surface all xAI TTS params in desktop GUI config

- Add speed, auto_speech_tags, text_normalization,
  optimize_streaming_latency, sample_rate, bit_rate to
  DEFAULT_CONFIG tts.xai block (backend schema source)
- Add field labels, descriptions, and section keys in
  frontend constants.ts for all 7 xAI TTS fields
- Update i18n translations (ja, zh, zh-hant)
- Fix stale tts.provider options in web_server.py schema
  overrides (was missing xai, minimax, mistral, gemini,
  kittentts, piper)
This commit is contained in:
Carlos Diosdado 2026-07-01 18:40:00 -06:00 committed by Teknium
parent e58534f9d7
commit 5c6499ce4d
6 changed files with 49 additions and 9 deletions

View file

@ -384,7 +384,13 @@ export const FIELD_LABELS: Record<string, string> = 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<string, string> = 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',

View file

@ -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 モデル',

View file

@ -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 模型',

View file

@ -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 模型',

View file

@ -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.71.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, # 02, 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",

View file

@ -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",