Skip to content

feat(api): wire conversation-scoped TTS fallback with provider flags - #3

Merged
mikelrh-dev merged 6 commits into
mainfrom
feature/tts-elevenlabs-wiring
Aug 16, 2026
Merged

feat(api): wire conversation-scoped TTS fallback with provider flags#3
mikelrh-dev merged 6 commits into
mainfrom
feature/tts-elevenlabs-wiring

Conversation

@mikelrh-dev

Copy link
Copy Markdown
Owner

Part of SDD change \ ts-elevenlabs-fallback\ — PR 3/3 (stacked-to-main; retargets automatically as PRs 1 & 2 merge).

What

  • Thread \conversation_id\ into \ ts_service.synthesize()\ / \synthesize_sentence()\ so per-conversation provider pinning works end-to-end
  • Non-streaming \POST /api/conversation/{id}/message\ now returns \ ts_provider\ in the JSON body
  • Streaming endpoint emits \provider\ on each \�udio_chunk\ SSE event
  • \periodic_cleanup\ evicts TTS provider-pinning state (\ orget_conversation) when evicting stale conversations
  • \TTSService\ initialized from new \TTS_*\ config vars

Tests

  • Provider flag tests (JSON + SSE)
  • Integration tests with real TTSService + mocked clients: EL failure → transparent MS fallback, per-conversation pinning, conversation isolation, both-fail → 503
  • Eviction tests for \�vict_stale_conversations\
  • Full suite: 112 passed (baseline 104), 3 warnings

Related

Thread conversation_id into synthesize/synthesize_sentence so per-conversation
provider pinning works end-to-end; expose the provider that produced audio as
tts_provider in message JSON and provider in streaming audio_chunk events;
evict TTS pinning state when periodic_cleanup evicts stale conversations;
initialize TTSService from the new TTS_* config vars.
@mikelrh-dev
mikelrh-dev merged commit 71433ad into main Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant