Add speaker-labeled transcripts, favicon, host stream fix, episode page
- Re-label all 8 episode transcripts with LUKE:/CALLER: speaker labels using LLM-based diarization (relabel_transcripts.py) - Add episode.html transcript page with styled speaker labels - Update publish_episode.py to generate speaker-labeled transcripts and copy to website/transcripts/ for Cloudflare Pages - Add SVG favicon with PNG fallbacks - Fix CPU issue: tie host audio stream to on-air toggle, not per-caller - Update how-it-works page with post-production pipeline info - Add transcript links to episode cards in app.js Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2339,6 +2339,11 @@ async def set_on_air(state: dict):
|
||||
global _show_on_air
|
||||
_show_on_air = bool(state.get("on_air", False))
|
||||
print(f"[Show] On-air: {_show_on_air}")
|
||||
if _show_on_air:
|
||||
_start_host_audio_sender()
|
||||
audio_service.start_host_stream(_host_audio_sync_callback)
|
||||
else:
|
||||
audio_service.stop_host_stream()
|
||||
threading.Thread(target=_update_on_air_cdn, args=(_show_on_air,), daemon=True).start()
|
||||
return {"on_air": _show_on_air}
|
||||
|
||||
@@ -3285,8 +3290,6 @@ async def signalwire_audio_stream(websocket: WebSocket):
|
||||
caller_service.hangup(caller_id)
|
||||
if session.active_real_caller and session.active_real_caller.get("caller_id") == caller_id:
|
||||
session.active_real_caller = None
|
||||
if len(caller_service.active_calls) == 0:
|
||||
audio_service.stop_host_stream()
|
||||
broadcast_event("caller_disconnected", {"phone": caller_phone, "reason": disconnect_reason})
|
||||
broadcast_chat("System", f"{caller_phone} disconnected ({disconnect_reason})")
|
||||
|
||||
@@ -3394,11 +3397,6 @@ async def take_call_from_queue(caller_id: str):
|
||||
"phone": call_info["phone"],
|
||||
}
|
||||
|
||||
# Start host mic streaming if this is the first real caller
|
||||
if len(caller_service.active_calls) == 1:
|
||||
_start_host_audio_sender()
|
||||
audio_service.start_host_stream(_host_audio_sync_callback)
|
||||
|
||||
return {
|
||||
"status": "on_air",
|
||||
"caller": call_info,
|
||||
@@ -3652,10 +3650,6 @@ async def hangup_real_caller():
|
||||
if call_sid:
|
||||
asyncio.create_task(_signalwire_end_call(call_sid))
|
||||
|
||||
# Stop host streaming if no more active callers
|
||||
if len(caller_service.active_calls) == 0:
|
||||
audio_service.stop_host_stream()
|
||||
|
||||
session.active_real_caller = None
|
||||
|
||||
hangup_sound = settings.sounds_dir / "hangup.wav"
|
||||
|
||||
@@ -515,6 +515,9 @@ class AudioService:
|
||||
|
||||
def start_host_stream(self, send_callback: Callable):
|
||||
"""Start continuous host mic capture for streaming to real callers"""
|
||||
if self._host_stream is not None:
|
||||
self._host_send_callback = send_callback
|
||||
return
|
||||
if self.input_device is None:
|
||||
print("[Audio] No input device configured for host streaming")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user