HeadlinesBriefing favicon HeadlinesBriefing.com

Sornic: Free Article‑to‑Audio Converter Built in a Weekend

DEV Community •
×

Sornic, a free article‑to‑audio converter, lets users paste any URL and hear the text in seconds. Built over a weekend, the tool stitches together Next.js 14 with the OpenAI TTS API, hosts on Vercel, and uses Upstash Redis for rate limiting. The result is a clean, voice‑rich experience that fits commuting, cooking, or workouts.

Extraction relies on Mozilla’s Readability library, the same engine behind Firefox’s Reader View, to pull the article body. Claude Haiku cleans navigation and ads, while the OpenAI TTS API chunks text into 4,096‑character pieces, converts each to MP3, and stitches them together. Upstash Redis enforces a 5‑article‑per‑day cap per IP.

Deploying on Vercel required extending the default 10‑second timeout to 60 seconds and downgrading jsdom to v24 to avoid ESM conflicts. Firecrawl steps in when sites block server‑side scraping. Costs hover around $0.03 per article for TTS, with a free tier that keeps usage affordable. Future plans include MP3 downloads, a browser extension, and a premium queue.