Repository navigation
fix(audio): honor ElevenLabs agent speed and style - #1707
pcbeingused33 wants to merge 1 commit into
Conversation
clark-cant
left a comment
There was a problem hiding this comment.
Summary: Fixes ElevenLabs TTS so agent-level speed/style overrides are honored. AdaptAgentParams maps the generic keys to flat dotted keys (voice_settings.speed, voice_settings.style) and merges them into opts.Params, but resolveELFloat read only via audio.GetNested, which parses the dot path and traverses the nested voice_settings map — so a flat dotted key was never seen and the provider's nested config won. The fix looks up the literal key first and falls back to the nested lookup. 2 files, +37/−6.
Risk level: Low.
Mandatory gates:
- Duplicate / prior implementation: clear.
gh pr list --state all --search "elevenlabs speed style voice_settings"and the matching issue search are empty; the adapter table ininternal/audio/agent_params_adapter.goalready documents the elevenlabs mapping (speed → voice_settings.speed,style → voice_settings.style), so this closes the gap between the adapter and the resolver rather than duplicating it. - Project standards: docs found (
CLAUDE.md). Change follows existing Go conventions; no i18n/migration/SQL surface affected. Build/vet/test path unaffected. - Strategic necessity: clear value. Real bug fix — restores agent-configured TTS speed/style for ElevenLabs, which were silently dropped. Small, well-scoped.
Findings:
- Suggestion —
resolveELFloatnow diverges from its siblings (resolveELBool/resolveELString/resolveELIntremain nested-only). Harmless today because onlyspeed/style(both floats) are adapted for ElevenLabs, but a one-line comment (or a shared flat-first helper) would prevent drift if a non-float override is added later. - Note — dropping the
params == nilguard is safe: reading from a nil map returns the zero value withok=false, andGetNestedon a nil map returns(nil,false)without panicking.
Verdict: Approve — no critical or important issues. mergeable=MERGEABLE, mergeStateStatus=CLEAN; all three CI checks green (run 46323108263: release-versioning, go, web). Test TestSynthesize_AgentVoiceSettings is a genuine regression test (fails before the fix, passes after).
Posted by /ck:review-pr at 2026-11-30T01:08:25Z
Summary
The agent parameter adapter adds flat
voice_settings.speedandvoice_settings.styleoverrides, but ElevenLabs previously looked up both values only in the nested provider configuration. Resolve flat numeric overrides first and fall back to nested settings when an override is absent. This preserves other configured voice settings.Type
Target Branch
devChecklist
go build ./...passesgo build -tags sqliteonly ./...passes (if Go changes)go vet ./...passesgo test -race ./...(rango test -race ./internal/audio/...)cd ui/web && pnpm build(if UI changes) (N/A, no UI changes)$1, $2(no string concat) (N/A, no SQL)internal/upgrade/version.go(if new migration) (N/A, no migration)Test Plan
go test ./internal/audio ./internal/audio/elevenlabs -count=1andgo test -race ./internal/audio/... -count=1Surface parity: The API contract, web UI, and CLI/runtime package are N/A because this corrects how the existing settings are serialized for ElevenLabs.
AI assistance was used to develop the patch and regression test.