Commit Graph

53 Commits

Author SHA1 Message Date
0a614eba6d Add banner, Apple Podcasts link, feed proxy, and fetch retry
- Add roostbanner.png hero banner image
- Add Apple Podcasts subscribe button
- Add Cloudflare Pages Function to proxy RSS feed (avoids CORS)
- Add fetch timeout and retry for episode loading
- Add contact email to footer
- Replace favicon with inline SVG rooster

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 14:03:29 -07:00
e979c4151d Update color scheme to match new cover art and bust image cache
Warm rustic bar palette (dark wood browns, orange neon accent, cream
text) replacing the previous navy/pink theme. Added ?v=2 to all
cover art URLs to force new image.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 13:04:38 -07:00
e6b9401848 Add episode list with RSS parsing and sticky audio player
Fetches episodes from Castopod RSS feed, renders episode cards with
play buttons, and provides a sticky bottom audio player with progress
bar and seeking. Falls back to CORS proxy if direct fetch fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 12:49:16 -07:00
d14000887c Add landing page with hero section, subscribe links, and dark theme
Static site for lukeattheroost.com with cover art, phone number,
subscribe buttons (Spotify, YouTube, Apple, RSS), and OG meta tags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 12:49:12 -07:00
7adf1bbcad Fix LLM model list, Castopod API, and server runner
- Remove gpt-4o-realtime (WebSocket-only) from OpenRouter models
- Increase OpenRouter timeout to 60s and max_tokens to 150
- Handle empty LLM responses
- Fix publish_episode.py for current Castopod API fields
- Add port conflict check and graceful shutdown to run.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 01:56:09 -07:00
a94fc92647 Improve SignalWire streaming, randomize caller names, update frontend
- Add streamSid tracking and per-caller send locks for SignalWire
- Improve TTS streaming with real-time pacing and detailed logging
- Block host audio to caller during TTS playback
- Randomize caller names between sessions from name pools
- Update page title and show phone number in UI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 01:56:05 -07:00
b0643d6082 Add recording diagnostics and refresh music list on play
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 01:00:41 -07:00
0412f4487f Enhance caller personality for depth and authenticity
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 00:39:49 -07:00
50e3d3af7d Include news and research context in caller prompts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 00:35:55 -07:00
a06d0a22e1 Wire up headline fetch and background research triggers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 00:22:49 -07:00
e46337a05a Add session news/research fields and helper functions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 00:21:25 -07:00
e28579f909 Add NewsService for current events awareness
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 00:18:40 -07:00
437980dfd4 Update tests for SignalWire phone caller format
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 17:47:50 -07:00
ecc30c44e1 Update frontend for phone caller display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 17:46:48 -07:00
9361a3c2e2 Remove browser call-in page 2026-02-05 17:46:37 -07:00
9016f9734f Add SignalWire endpoints, update queue/hangup for phone callers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 17:45:08 -07:00
051790136e Update CallerService for SignalWire protocol
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 17:41:27 -07:00
c22818bfec Add SignalWire configuration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 17:38:41 -07:00
a1c94a3682 Fix unnatural response cutoffs
- Replace aggressive sentence-count limiting with ensure_complete_thought()
  which only trims if the LLM was actually cut off mid-sentence
- Softer prompt guidance for natural brevity instead of rigid sentence count
- max_tokens at 100 as natural length cap

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 17:18:22 -07:00
9d4b8a0d22 Replace token-based truncation with sentence-count limiting
- max_tokens back to 150 so LLM can finish thoughts
- New limit_sentences() keeps only first 2 complete sentences
- Never cuts mid-sentence — always ends at punctuation
- Applied to both chat and auto-respond paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 17:15:04 -07:00
9c5f7c5cfe Add debug logging and safety for piggybacked recording
- Log chunk count and peak audio level on recording stop
- Add null check on _recorded_audio in callback
- Small delay after stopping piggybacked recording for callback to finish

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 17:11:51 -07:00
6a56967540 Enforce shorter AI responses and prevent cut-off sentences
- Reduce max_tokens from 100 to 75 for shorter output
- Add truncate_to_complete_sentence() to trim at last punctuation
- Applied to both chat and auto-respond paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 17:07:41 -07:00
0e65fa5084 Force shorter AI responses — max 1-2 sentences
- Much stronger prompt language: "no more than 2 sentences EVER"
- Added "DO NOT ramble" instruction
- Reduced max_tokens back to 100 as hard limit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 17:05:51 -07:00
3192735615 Fix AI responses being cut off
- Increase max_tokens from 100 to 150 to avoid mid-sentence truncation
- Tighten prompt to 1-2 short sentences with emphasis on completing them

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 17:04:12 -07:00
d583b48af0 Fix choppy/distorted audio to live caller
- Mute host mic forwarding while TTS is streaming to prevent interleaving
  both audio sources into the same playback buffer
- Replace nearest-neighbor downsampling with box-filter averaging on both
  server (host mic) and browser (caller mic) for anti-aliased resampling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 17:01:33 -07:00
d4e25ceb88 Stream TTS audio to caller in real-time chunks
TTS audio was sent as a single huge WebSocket frame that overflowed the
browser's 3s ring buffer. Now streams in 60ms chunks at real-time rate.
Also increased browser ring buffer from 3s to 10s as safety net.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 16:56:22 -07:00
97d37f3381 Send AI TTS audio to live caller during auto-respond
The auto-respond function played AI TTS to the local Loopback channel
but didn't send it over WebSocket to the live caller in the browser.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 16:53:41 -07:00
eaedc4214b Reduce live caller latency and improve reliability
- Replace per-callback async task spawning with persistent queue-based sender
- Buffer host mic to 60ms chunks (was 21ms) to reduce WebSocket frame rate
- Reduce server ring buffer prebuffer from 150ms to 80ms
- Reduce browser playback jitter buffer from 150ms to 100ms

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 16:47:17 -07:00
af8606b5b7 Fix recording conflict when host stream is active
When a live caller is on air, the host stream already has an InputStream
open. Opening a second one for push-to-talk recording causes a conflict.
Now recording piggybacks on the host stream callback instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 16:42:07 -07:00
4d97ea9099 Replace queue with ring buffer jitter absorption for live caller audio
- Server: 150ms pre-buffer ring buffer eliminates gaps from timing mismatches
- Browser playback: 150ms jitter buffer (up from 80ms) for network jitter
- Capture chunks: 960 samples/60ms (better network efficiency)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 16:37:50 -07:00
7aed4d9c34 Fix live caller audio latency and choppiness
- Reduce capture chunk from 4096 to 640 samples (256ms → 40ms)
- Replace BufferSource scheduling with AudioWorklet playback ring buffer
- Add 80ms jitter buffer with linear interpolation upsampling
- Reduce host mic and live caller stream blocksizes from 4096/2048 to 1024
- Replace librosa.resample with numpy interpolation in send_audio_to_caller

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 16:32:27 -07:00
ab36ad8d5b Fix choppy audio and hanging when taking live callers
- Use persistent callback-based output stream instead of opening/closing per chunk
- Replace librosa.resample with simple decimation in real-time audio callbacks
- Move host stream initialization to background thread to avoid blocking
- Change live caller channel default to 9

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 16:24:27 -07:00
bcd0d96185 Fix slow hangup by moving LLM summarization and SFX to background
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 16:09:10 -07:00
cca8eaad84 Add live caller channel to audio settings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 16:03:52 -07:00
edcd5ebb1b Bump app.js cache version to force browser reload
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 16:01:15 -07:00
41ddc8ee35 Remove Twilio dependencies and cleanup references
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 15:54:35 -07:00
a72c1eb795 Update tests for CallerService and browser caller format
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 15:53:41 -07:00
82ad234480 Add browser call-in page and update host dashboard for browser callers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 15:52:54 -07:00
863a81f87b Add continuous host mic streaming to real callers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 15:51:17 -07:00
bf140a77b7 Add browser caller WebSocket handler with PCM audio streaming
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 15:49:49 -07:00
06f334359e Remove Twilio endpoints and dependencies
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 15:48:12 -07:00
3961cfc9d4 Rename TwilioService to CallerService, remove Twilio-specific audio encoding
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 15:45:08 -07:00
db134262fb Add frontend: call queue, active call indicator, three-party chat, three-way calls
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 13:46:19 -07:00
8dc1d62487 Add Twilio and Cloudflare tunnel setup docs 2026-02-05 13:44:24 -07:00
141f81232e Add AI follow-up system with call summarization and show history
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 13:42:35 -07:00
c82420ddad Add outbound audio streaming to real callers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 13:39:02 -07:00
88d7fd3457 Add Twilio WebSocket media stream handler with real-time transcription
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 13:36:04 -07:00
28ff8c2d16 Add Twilio webhook and queue management endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 13:33:03 -07:00
924ddca71a Add Twilio call queue service with channel allocation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 13:31:02 -07:00
00c2e8f018 Add Session multi-party call support and show history
- Add CallRecord dataclass for tracking call history
- Extend Session with call_history, active_real_caller, ai_respond_mode, auto_followup
- Add get_show_history() for AI caller context about earlier calls
- Update get_conversation_summary() to handle host/real_caller/ai_caller roles
- Update reset() to clear new fields
- Add tests for all new functionality

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 13:25:32 -07:00