fix(desktop): trim voice picker tests to invariants; document ElevenLabs model ids
Follow-up to the salvaged #94013 hunk: keep two invariant cases in voice-field-visible.test.ts (unset provider falls back to edge/local; an explicit STT provider shows only its own fields) and one suggestion pin (eleven_v3 is offered, mirroring tools/tts_tool_delivery.py's model table). Drop the option-list change-detector and the gpt-transcribe pin — that option was already on main, the bug was only that the row never rendered. The regex only ever matches tts|stt, so the fallback ternary collapses to edge/local (also clears the padding-line lint warning). Voice docs now say the Desktop field accepts any ElevenLabs model id. Adds the contributor email mapping for the cherry-picked commit's author.
This commit is contained in:
@@ -177,7 +177,8 @@ export function voiceFieldVisible(key: string, config: HermesConfigRecord): bool
|
||||
const selected = String(getNested(config, `${domain}.provider`) ?? '')
|
||||
// Backend defaults when the key is unset: TTS → edge, STT → local.
|
||||
// An empty string used to hide every nested model field.
|
||||
const fallback = domain === 'tts' ? 'edge' : domain === 'stt' ? 'local' : ''
|
||||
const fallback = domain === 'tts' ? 'edge' : 'local'
|
||||
|
||||
return provider === (selected || fallback)
|
||||
}
|
||||
|
||||
|
||||
@@ -62,24 +62,9 @@ describe('voice field option coverage', () => {
|
||||
}
|
||||
})
|
||||
|
||||
it('suggests ElevenLabs v3 and current flash/turbo ids, not just multilingual v2', () => {
|
||||
const models = ENUM_OPTIONS['tts.elevenlabs.model_id']
|
||||
|
||||
for (const model of [
|
||||
'eleven_v3',
|
||||
'eleven_ttv_v3',
|
||||
'eleven_multilingual_v2',
|
||||
'eleven_turbo_v2',
|
||||
'eleven_turbo_v2_5',
|
||||
'eleven_flash_v2',
|
||||
'eleven_flash_v2_5'
|
||||
]) {
|
||||
expect(models).toContain(model)
|
||||
}
|
||||
})
|
||||
|
||||
it('suggests gpt-transcribe as an OpenAI STT model', () => {
|
||||
expect(ENUM_OPTIONS['stt.openai.model']).toContain('gpt-transcribe')
|
||||
it('suggests the current ElevenLabs v3 model, not just the v2 trio', () => {
|
||||
// Mirrors tools/tts_tool_delivery.py::ELEVENLABS_MODEL_MAX_TEXT_LENGTH.
|
||||
expect(ENUM_OPTIONS['tts.elevenlabs.model_id']).toContain('eleven_v3')
|
||||
})
|
||||
|
||||
it('keeps closed enums (devices, providers) out of the free-input set', () => {
|
||||
|
||||
1
contributors/emails/ramarivera@gmail.com
Normal file
1
contributors/emails/ramarivera@gmail.com
Normal file
@@ -0,0 +1 @@
|
||||
ramarivera
|
||||
@@ -484,7 +484,7 @@ tts:
|
||||
voice: "en-US-AriaNeural" # 322 voices, 74 languages
|
||||
elevenlabs:
|
||||
voice_id: "pNInz6obpgDQGcFmaJgB" # Adam
|
||||
model_id: "eleven_multilingual_v2"
|
||||
model_id: "eleven_multilingual_v2" # or eleven_v3, eleven_flash_v2_5, ... (Desktop Settings → Voice accepts any model id)
|
||||
openai:
|
||||
model: "gpt-4o-mini-tts"
|
||||
voice: "alloy" # alloy, echo, fable, onyx, nova, shimmer
|
||||
|
||||
Reference in New Issue
Block a user