Doctors Who Code / Oct 16, 2026
Every Article Deserves an Audio Edition
A proposal to make Fish Audio narration a standard part of DWC Random Thoughts: publish an article once, generate its audio automatically, and let readers choose how they engage.
Audio is temporarily unavailable. You can continue reading below.
NOTE
I want every article on DWC Random Thoughts to have an audio edition. Reading should remain the foundation, but listening should be a standard option for people who prefer it or want to engage while away from a screen.
The publishing experience should be straightforward:
Write → Publish → Audio generated → Readers listen.
There should be no separate editorial approval, manual audio upload, or additional publishing step. Every article published through EmDash would automatically receive an MP3 narration generated with Fish Audio, using one consistent voice across the site.
This is a proposal for how that experience should work, rather than an announcement that the feature is already available.
Publication comes first
Audio should extend an article’s availability without becoming a condition of publication. A new article would go live normally while narration is generated in the background. When the audio is ready, an accessible player would appear beneath the title.
If Fish Audio is unavailable or generation fails, the article would remain readable. The system would retry automatically and record failures for review. An audio service outage should never become a publishing outage.
Five rules for the publishing lifecycle
1. When a new article is published, automatically queue MP3 generation. 2. When a published article changes, regenerate narration only if the spoken content changes. 3. While audio is pending or processing, keep the article available and display the player when narration is ready. 4. When generation fails, retry automatically and retain an error record for review. 5. When an article is deleted or unpublished, remove public access to its audio. Storage cleanup can happen separately.
The distinction between an editorial update and a spoken-content update matters. Changing navigation, metadata, or another element outside the narration should not trigger an unnecessary recording. Changing a sentence that listeners would hear should.
A consistent listening experience
Each article would use the same configurable Fish Audio voice, giving the publication a consistent sound. The player would offer play and pause, seeking, elapsed time, playback-speed controls, and an MP3 download option.
Accessibility belongs in the initial design. The controls should work with a keyboard, have understandable labels, and support readers who use assistive technology. Readers should be able to choose between the written article and its audio edition.
How I would build it
The proposed stack is EmDash CMS, Cloudflare Workers, Cloudflare Queues, Cloudflare R2, and the Fish Audio API.
An EmDash publication event would enqueue a background narration job. The intended integration point is content:afterPublish, with content:afterSave used to detect changes to already published articles. The installed EmDash version’s hook behavior—including scheduled publication—would need verification before implementation.
A Worker consuming the queue would convert article content into narration-friendly text. Code blocks, metadata, navigation, and irrelevant URLs would be excluded. The system would hash that text and compare it with the previously generated version, avoiding regeneration when the spoken text is unchanged.
Fish Audio would generate MP3 narration using a configurable default voice and preferred model. Completed audio would be stored in R2. Long articles would require appropriate text segmentation and audio assembly, rather than assuming every article fits into a single request.
The Fish Audio API key, FISH_API_KEY, would be stored securely as a Cloudflare secret. FISH_VOICE_ID and the model selection would be configurable.
Reliability is part of the feature
Each article’s audio would have an explicit status: pending, processing, ready, or failed. Background jobs would use automatic retries and error logging so that failures are visible and recoverable.
Generation would also need protection against stale jobs. If an article is updated while an older narration is still processing, the older job must not replace audio for the newer text.
Audio delivery would support HTTP range requests for reliable playback and seeking. Public access would follow the article’s publication status, including when a reader has previously obtained an audio URL. Removing the player alone would not be sufficient to withdraw an unpublished article’s recording.
Bring the archive along
I would include every existing published article in a one-time audio-generation backfill. The goal is a consistent listening experience across the whole publication, not a feature available only to new posts.
The backfill would use the same generation, status tracking, and failure-handling workflow as new publications.
A practical implementation standard
Before changing the project, I would inspect the existing EmDash installation, content schema, routes, and Cloudflare configuration. The implementation should be the smallest maintainable solution compatible with the installed version.
Local testing, a Fish Audio integration check with a sample article, and documented deployment and rollback procedures would precede production rollout. Production deployment would require explicit approval.
The acceptance standard is simple: every newly published article receives narration automatically, existing published articles can be processed through a backfill, and audio generation remains reliable, observable, and independent of article publication.
The editorial workflow stays familiar. Write the article. Publish it once. Give readers another way to listen.
Part of the DWC Random Thoughts notebook.
Keep reading →