mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
1. Merge session + SDP into single POST /transcribe/connect The two-step flow (POST /transcribe/session → POST /transcribe/sdp) stored the OpenAI client secret in an in-memory DashMap, which breaks in HA deployments where the two requests may land on different relay replicas. Replaced with a single POST /transcribe/connect that accepts the SDP offer, mints the OpenAI session, proxies the SDP exchange, and returns the SDP answer + model — all in one request. No server-side session state is needed between requests, so this works correctly across any number of replicas. Removed the transcribe_sessions DashMap from AppState entirely. 2. Clear isTranscribing even when final text is unchanged When a TRANSCRIPT_COMPLETED_EVENT produces no text change (final matches accumulated deltas), the early-return in handleRealtimeEvent skipped the setIsTranscribing(false) call. This left the 'Transcribing…' indicator stuck indefinitely. Fixed by updating the transcribing flag before the text-change early return.