Phase 4 Devlog — Deployment & Voice Reliability
Phase 4 was less about the face and more about getting the thing actually reachable and sounding right. Three separate problems, three separate fixes.
1) GitHub Pages was never going to work
Deployments sat in deployment_queued and timed out, over and over, on totally unrelated repos. Turned out it wasn’t a config issue at all — GitHub’s status page had an active incident open the same day (“Incident with Pages,” degraded performance, investigating). No amount of poking at Settings → Pages or the Actions tab was going to fix an outage on their end. Moved hosting off Pages entirely rather than wait it out.
2) The Fish Audio proxy needed its own home
The app calls out to Fish Audio for Rick’s voice, but the API key can’t be trusted client-side and Fish’s endpoint doesn’t play nice with browser CORS anyway. Solved both with a small Cloudflare Worker that does one job: accept a POST to /tts with fishKey, text, and a few optional params (reference_id, format, model), forward it to Fish Audio, and hand back the raw audio bytes.
The frontend already had the right shape for this call, so it was mostly a matter of getting the Worker’s workers.dev subdomain toggled on — it silently doesn’t activate until there’s an actual deployed script behind it, which cost a bit of head-scratching before the first real deploy went through.
3) Voice playback was getting blocked, then falling out of sync
Two separate bugs stacked on top of each other here.
audio.play() was firing after an await fetch(), and by then Chrome no longer considered it tied to the user’s original click — so playback silently failed with a permission error. Fixed by unlocking the page’s audio system on the very first click/keypress/tap anywhere, which browsers treat as valid for the rest of the session regardless of how much async work happens in between.
Once audio was actually playing, timing was off. There’s a fallback timer that force-reveals Rick’s reply text if the voice hasn’t started yet, originally set to 6 seconds. Fish Audio’s real-world response time runs closer to 8 seconds, so text was popping up two seconds before the voice caught up — reply and audio landing noticeably out of step. Bumped the fallback specifically for Fish voice mode to 15 seconds, leaving the faster browser-TTS and text-only modes untouched since they never had the delay problem to begin with.
Net result
The app deploys somewhere that isn’t at the mercy of a GitHub outage, the voice proxy has its own dedicated backend instead of leaking a key client-side, and audio no longer gets blocked or races ahead of the text it’s supposed to accompany.