Commit Graph

32 Commits

Author SHA1 Message Date
6eeab58464 TTS fixes, Inworld improvements, footer redesign, episodes 15-25, invoice script fix
- Fix TTS text pipeline: new caps handling (spell out unknown acronyms, lowercase
  emphasis words), action-word lookahead for parenthetical stripping, abbreviation
  expansions (US→United States, NM→New Mexico), pronunciation fixes
- Inworld TTS: camelCase API fields, speakingRate per-voice overrides, retry logic
  with exponential backoff (3 attempts)
- Footer redesign: SVG icons for social/podcast links across all pages
- Stats page: show "Rate us on Spotify" instead of "not public" placeholder
- New voices, expanded caller prompts and problem scenarios
- Social posting via Postiz, YouTube upload in publish pipeline
- Episode transcripts 15-25, terms page, sitemap updates
- Fix invoice script: match Timing totals using merged Task+App intervals

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:38:58 -07:00
08a35bddeb Play idents in stereo on channels 15/16 with configurable ident_channel setting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:28:26 -07:00
bbcf767a8f Add idents playback section — loads from idents/ folder, plays on ads channel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:24:40 -07:00
d611f60743 SFX emojis, non-blocking email view, deploy/git docs in CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 05:34:25 -07:00
d85a8d4511 Add listener email system with IMAP polling, TTS playback, and show awareness
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 05:22:56 -07:00
3164a70e48 Ep13 publish, MLX whisper, voicemail system, hero redesign, massive topic expansion
- Switch whisper transcription from faster-whisper (CPU) to lightning-whisper-mlx (GPU)
- Fix word_timestamps hanging, use ffprobe for accurate duration
- Add Cloudflare Pages Worker for SignalWire voicemail fallback when server offline
- Add voicemail sync on startup, delete tracking, save feature
- Add /feed RSS proxy to _worker.js (was broken by worker taking over routing)
- Redesign website hero section: ghost buttons, compact phone, plain text links
- Rewrite caller prompts for faster point-getting and host-following
- Expand TOPIC_CALLIN from ~250 to 547 entries across 34 categories
- Add new categories: biology, psychology, engineering, math, geology, animals,
  work, money, books, movies, relationships, health, language, true crime,
  drunk/high/unhinged callers
- Remove bad Inworld voices (Pixie, Dominus), reduce repeat caller frequency
- Add audio monitor device routing, uvicorn --reload-dir fix
- Publish episode 13

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 01:56:47 -07:00
28af0723c7 Ep12 publish, caller prompt overhaul, favicon, publish fixes, website updates
- Reworked caller prompt: edgy/flirty personality, play along with host bits
- Bumped caller token budget (200-550 range, was 150-450)
- Added 20 layered/morally ambiguous caller stories
- Valentine's Day awareness in seasonal context
- Default LLM model: claude-sonnet-4-5 (was claude-3-haiku)
- Publish: SCP-based SQL transfer (fixes base64 encoding on NAS)
- Favicons: added .ico, 48px, 192px PNGs for Google search results
- Website: button layout cleanup, privacy page, ep12 transcript
- Control panel: channel defaults match audio_settings.json
- Disabled OP3 permanently (YouTube ingest issues on large files)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 22:53:34 -07:00
9fd977ad9f Postprod overhaul, control panel theme, caller names, website updates
- Fix denoise mangling host audio: strip aggressive afftdn/anlmdn, keep HPF only
- Add stem limiting for ads/SFX to prevent clipping
- Spoken-word compression on host (threshold -28dB, ratio 4:1)
- Add bus compressor on final stereo mix (LRA 7.9 → 5.7 LU)
- Drop SFX mix level from -6dB to -10dB
- De-esser fix: replace split-band with simple high-shelf EQ
- Pipeline now 15 steps (was 13)
- Control panel theme: match website warm brown/orange palette
- Expand caller names to 160 (80M/80F), fix duplicate name bug
- Update how-it-works page: returning callers, 15-step pipeline, remove busy diagram row

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 04:39:31 -07:00
95c2d06435 Postprod improvements: denoise, phone EQ, ad muting, ducking, voice mappings
- Add host mic noise reduction (afftdn + anlmdn)
- Add phone EQ bandpass on caller stem
- Mute music during ads with 2s lookahead/tail
- Increase ducking release to 3s to reduce pumping
- Add Inworld voice mappings for all regular callers
- Recording toggle endpoint, stem sync fixes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 03:59:08 -07:00
75f15ba2d2 Add persistent caller voices, Discord, REC/on-air linking, SEO fixes, ep9
- Returning callers now keep their voice across sessions (stored in regulars.json)
- Backfilled voice assignments for all 11 existing regulars
- Discord button on homepage + link in all page footers
- REC and On-Air buttons now toggle together (both directions)
- Fixed host mic double-stream bug (stem_mic vs host_stream conflict)
- SEO: JSON-LD structured data on episode + how-it-works pages
- SEO: noscript fallbacks, RSS links, twitter meta tags
- Episode 9 transcript and sitemap update

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 00:24:37 -07:00
7d88c76f90 Add post-production pipeline: stem recorder, postprod script, recording UI
New stem recording system captures 5 time-aligned WAV files (host, caller,
music, sfx, ads) during live shows. Standalone postprod.py processes stems
into broadcast-ready MP3 with gap removal, voice compression, music ducking,
and EBU R128 loudness normalization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 17:53:32 -07:00
356bf145b8 Add show improvement features: crossfade, emotions, returning callers, transcripts, screening
- Music crossfade: smooth 3-second blend between tracks instead of hard stop/start
- Emotional detection: analyze host mood from recent messages so callers adapt tone
- AI caller summaries: generate call summaries with timestamps for show history
- Returning callers: persist regular callers across sessions with call history
- Session export: generate transcripts with speaker labels and chapter markers
- Caller screening: AI pre-screens phone callers to get name and topic while queued

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 02:43:01 -07:00
f654a5cbb1 Deep caller personality: named people, memories, vehicles, opinions, arcs
- Named relationships (20M/20F): "my buddy Ray", "my wife Linda" — not generic
- Relationship status with detail: "married 15 years, second marriage"
- Vehicle they drive: rural southwest flavor (F-150s, Tacomas, old Broncos)
- What they were doing before calling: grounds call in a physical moment
- Specific memory/story to reference: flash floods, poker wins, desert nights
- Food/drink right now: Tecate on the porch, third cup of coffee
- Strong random opinions: speed limits, green chile, desert philosophy
- Contradictions/secrets: tough guy who cries at TV, reads physics at work
- Verbal fingerprints: 2 specific phrases per caller
- Emotional arcs: mood shifts during the call
- Show relationship: first-timer, regular, skeptic, reactive
- Late-night reasons: why they're awake
- Topic drift tendencies for some callers
- Regional speech patterns in prompt (over in, down the road, out here)
- Opening line variety based on personality
- Local town news enrichment via SearXNG
- Ad channel now configurable in settings UI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 01:01:32 -07:00
9452b07c5c Ads play once on channel 11, separate from music
- Add dedicated ad playback system (no loop, own channel)
- Ad channel defaults to 11, saved/loaded with audio settings
- Separate play_ad/stop_ad methods and API endpoints
- Frontend stop button now calls /api/ads/stop instead of stopMusic

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 22:35:07 -07:00
b3fb3b1127 Fix AI caller hanging on 'thinking...' indefinitely
- Add 30s timeout to all frontend fetch calls (safeFetch)
- Add 20s asyncio.timeout around lock+LLM in chat, ai-respond, auto-respond
- Reduce OpenRouter timeout from 60s to 25s
- Reduce Inworld TTS timeout from 60s to 25s
- Return graceful fallback responses on timeout instead of hanging

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 21:16:15 -07:00
e30d4c8856 Add ads system, diversify callers, update website descriptions
- Add ads playback system with backend endpoints and frontend UI
- Diversify AI callers: randomize voices per session, expand jobs/problems/interests/quirks/locations
- Update website tagline and descriptions to "biologically questionable organisms"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 20:38:25 -07:00
d5fd89fc9a Add on-air toggle for phone call routing
When off air, callers hear a message and get disconnected. When on
air, calls route normally. Toggle button added to frontend header
with pulsing red ON AIR indicator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 14:03:38 -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
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
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
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
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
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
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
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
029ce6d689 Initial commit: AI Radio Show web application
- FastAPI backend with multiple TTS providers (Inworld, ElevenLabs, Kokoro, F5-TTS, etc.)
- Web frontend with caller management, music, and soundboard
- Whisper transcription integration
- OpenRouter/Ollama LLM support
- Castopod podcast publishing script

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:11:20 -07:00