feat(voice): server-side voice-message transcription [operator-action] (LC-483) #459
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/LC-483-voice-message-transcription"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Server-side transcription of voice messages (LC-483, first shortlist item from the brainstorm epic LC-475). When the operator has configured
LETS_CHAT_STT_*, an uploaded voice message is transcribed off the request path and the text is shown under the waveform. Reuses the OpenAI-compatible STT pipeline already shipped for call transcription, so this is mostly plumbing.How
chat/0068_voice_transcript.sqladdsfile_uploads.transcript(NULL = not transcribed / STT off / failed / not a voice message).db::uploadscarriestranscriptthrough the attachment read paths and adds aset_transcriptsetter;Attachmentgains atranscriptfield.routes::room::maybe_transcribe_voice_messageis spawned afterfinalize_message_send, gated onstt_available()+ afile_id. It re-checks the attachment is a voice message (audio mime + waveform), reads the bytes, transcribes, caps atMAX_VOICE_TRANSCRIPT_CHARS(8000), stores, and broadcasts. Idempotent (skips a row that already has a transcript); all failures are non-fatal and leave the message transcript-less.ChatEvent::VoiceTranscribed { message_id, room_id }reuses the existing per-recipientrender_edited_messagearm (no new renderer), so the message re-renders in place once transcription completes. Classified alongsideMessageRegroupedinws_fragments::render_event.partials/attachment.htmlas escaped plain text using Tailwind token classes (light/dark parity). i18n keypartials-voice-transcriptadded in en + es.Tests
Three deterministic cases in
transcripts.rsvia the existingMockSttClientharness (now exposingAppState): voice message transcribed + attached, non-voice upload skipped, STT-disabled no-op.just check,just test,just test-saasall green (standalone + saas, clippy-D warnings).Operator note
[operator-action]marker: no action required, but enablingLETS_CHAT_STT_URLnow sends voice-message audio to that endpoint in addition to call audio - a load/cost consideration on a metered engine. Documented in the CLAUDE.md STT row and thesttmodule header.Verify
just verifybuilds the release binary clean; the boot step fails only because the server-up compose env does not supply the mandatoryLETS_CHAT_BUNYIP_SSO_*vars (the standalone build refuses to boot without them) - the same environmental failure as every PR in this series, not a regression.