Laughtrackr

Laughtrackr is a laugh track site, for entertainment purposes only. You upload a video and get it back with laugh tracks mixed into the audio, timed to the pauses in the speech.

The software finds every pause (the hesitations, the dramatic beats, the moments where someone lost their train of thought) and fills each one with a laugh sized to the silence. A half-second stumble gets a single chuckle. A three-second stare into the middle distance gets the full studio audience.

How it hears

Voice Activity Detection (VAD) finds the pauses. VAD can tell a quiet room apart from a speaker who stopped talking, which plain silence detection can’t. The pipeline maps every gap in speech, measures how long it is, and sorts it into one of four tiers: tiny, short, medium, and long. Each tier has its own bank of real recorded audience reactions, stored as WAV files — 27 samples across the four tiers. The size of the laugh matches the length of the pause. The detector is Silero VAD running on PyTorch on the CPU, so it needs no GPU.

How it builds

Once the pauses are mapped and the laughs are picked, ffmpeg mixes the laugh samples into the original audio track at the right timestamps and remuxes the result back into the video container. Only the audio gets touched. The video stream is never re-encoded, because re-encoding is slow and lossy, and nobody uploaded their clip to get it back at a lower bitrate.

The preview lets you hear the laughs before committing to a full render. It’s audio-only, so it comes back fast. If the algorithm put a belly laugh where you wanted a snicker, you can adjust individual insertions: move them, swap tiers, or delete them. Then you render the final video with your changes baked in.

The stack

FastAPI on the backend, Nuxt 4 on the frontend, and SQLite through async SQLAlchemy for users, credit transactions, magic-link tokens, promo codes, and job records. Live job state sits in memory. The upload-to-download flow is: upload → VAD analysis → pause classification → laugh selection → preview → optional edits → final render → download. Each step is a job state transition that the frontend polls. In production, uploads are capped at five minutes of video and 200 MB, and finished jobs are deleted after 24 hours.

Authentication is JWT with magic links sent through Resend. There are no passwords to manage and no OAuth providers holding your data. You get an email, click the link, and you’re in. The API is rate-limited with slowapi, and there’s an admin console for usage metrics and account and credit management.

What it costs

Nothing, for now. Videos under thirty seconds are free outright. Longer ones cost credits, one per minute of video, and every new account starts with ten. When you get down under three, there’s a button that asks for more. The receipt for that one says “More, sir, please,” and it gives you another ten.

Paid credits through Stripe are built and tested end to end in Stripe’s sandbox, then switched off behind a flag for launch. I’d rather find out whether anyone wants this before asking them for money.

Right-sizing

Production runs on a small DigitalOcean droplet that it shares with about fifteen of my other sites, so the laugh track has to be a polite tenant. The first measurement was bad: a five-minute video peaked at 1.4 GB of memory, on a box with about half a gigabyte free. Most of that was the audio being resampled for the VAD model all at once. Switching to a polyphase resampler cut the peak to about 680 MB with identical pauses detected on real narration.

That still didn’t fit, so the droplet grew to two vCPUs and 4 GB, which made every site on it a little faster. The API gets a hard memory cap and exactly one of those two cores. PyTorch and ffmpeg will happily use every core they can see, and without the cap, one person’s render would stall everyone else’s blog.

I spent a while trying to send the heavy audio work home to the homelab, where there’s far more compute sitting idle. I talked myself out of it. Part of the appeal of a service like this is that it doesn’t keep a copy of what you upload, and routing every upload through my basement works against that. So it’s cloud only, with the droplet’s vCPUs earning their keep.

Scale and status

About 4,400 lines of Python in the backend, about 3,100 lines of Vue and TypeScript in the frontend, and 58 tests covering the audio math, the mixer, and the API. I built it with Claude Code, and 43 of the 49 commits are co-authored by it. The repo is private.

The first commit was in February 2026. Sign-up, credits, and Stripe landed in April, the admin console over the summer, and the sandboxed payment testing in the fall. Then it sat, fully built, for months, because production deploys from a version tag and nobody had cut one. Version 0.9.5 went out on November 29, 2026. The images build in my homelab CI and push to a self-hosted Gitea registry, and the droplet pulls them. Caddy proxies to the Nuxt server, which proxies /api to FastAPI. Staging runs in the homelab, and analytics are a self-hosted Umami.

Why this exists

The world has enough serious software, and I like it when a stupid idea turns out to actually work. Somewhere out there is a conference talk, a wedding toast, or a quarterly earnings call that would be better with a well-timed laugh track.