Skip to main content
SPEC
// audio sink bleep

BAZ Audio Sink Bleep

ragbaz:audio-sink — version 0.1.0

Consume audio artifacts from a RAGBAZ pipeline and publish them as a podcast-formatted stream: RSS feed, episode enclosures, chapter markers, transcripts, and artwork — delivered through a CDN, optionally pinned to IPFS, and optionally mirrored as a Tor hidden service.

RSS · CDN · IPFS · TOR · WASM

Two-node Nordic origin (fillmeup / konsonans) behind TailScale — podcast for ~500 listeners per tenant, global reach via Cloudflare R2 + Workers, MP3 primary with Opus alternate.

Draft v0.1 2026-06-03

Status Overview

RSS 2.0 + iTunes namespace, Podlove chapters + VTT transcripts, Cloudflare R2 + Workers delivery, IPFS archive layer — all production-ready.

Tor .onion enclosure mirror and IPFS as primary delivery are experimental. HLS for podcast is niche.


Delivery Architecture

konsonans (Oslo) ───┐
├── TailScale ── cloudflared tunnel ──► Cloudflare R2 + Workers
fillmeup (Stockholm)┘ 330+ PoPs globally

┌─────────────────────────┼──────────────┐
EU <40ms NA <90ms APAC <200ms
P95 P95 P95
DecisionRationale
R2 over BunnyZero egress; DNS already on Cloudflare; Workers for RSS logic
Direct download over HLSUniversal client support; no DAI requirement
Filebase for IPFSS3-compatible API simplest from Wasm host; 3-region replication
TailScale tunnel as originNo public ingress needed on fillmeup or konsonans
Opt-in Tor onlyHigh operational burden; reserve for explicit need
MP3 primary + Opus alternateApple Podcasts compatibility floor; Opus for supporting clients

Podcast Output Formats

RSS 2.0 + iTunes / Spotify

Channel requires <title>, <description>, <language>, <copyright>, <itunes:author>, <itunes:owner>, <itunes:category>, <itunes:image> (1400×1400 min, 3000×3000 max, square, RGB, ≤500 KB).

Items require <enclosure>, <guid>, <pubDate>, <itunes:duration>, <itunes:episode>, <itunes:season>, <itunes:episodeType>.

Enclosure Codecs

MP3 (CBR 128 kbps)audio/mpeg**Primary** — universal client support
AAC-LC (M4A, 96–128 kbps)audio/mp4`<podcast:alternateEnclosure>`
Opus (OGG, 64–96 kbps)audio/ogg`<podcast:alternateEnclosure>` — not Apple Podcasts

CDN Latency Benchmarks (TTFB P50 / P95)

Direct from Stockholm (no CDN)20 / 60 ms50 / 110 ms
Cloudflare R2 + Workers (cached)15 / 35 ms25 / 55 ms
Bunny.net High-Volume14 / 32 ms24 / 50 ms
Fastly16 / 35 ms28 / 60 ms
IPFS via gateway (warm)80 / 250 ms120 / 350 ms
IPFS cold (DHT lookup)1.5 / 8 s2 / 10 s
Tor v3 hidden service250 / 800 ms300 / 900 ms

WIT Interface

package ragbaz:audio-sink@0.1.0;

interface types {
record audio-artifact {
bytes: list<u8>,
mime: string,
duration-seconds: f32,
bitrate-kbps: u32,
}

record episode-metadata {
title: string,
description: string,
episode-number: option<u32>,
season-number: option<u32>,
episode-type: episode-type,
pub-date-rfc3339: string,
explicit: bool,
artwork: option<artwork>,
chapters: list<chapter>,
transcript-vtt: option<string>,
guid: string,
}

variant episode-type { full, trailer, bonus }
// ... (full spec in ragbaz:audio-sink package)
}

Publish Pipeline

1

Validate — Check audio MIME, duration, artwork dimensions. Compute content SHA-256 → episode URL slug (immutable after publish).

2

Upload — Upload enclosure + alternate codecs to CDN target. Upload artwork (resized if needed), chapters JSON, transcript VTT.

3

Optional pin — Pin to IPFS; capture CID. Mirror to Tor hidden service via TailScale tunnel.

4

Feed — Regenerate RSS feed with new <item>. Upload feed.xml to CDN root. Purge CDN cache on feed.xml only (episodes are immutable, never purged).

5

Pre-warm — Warm IPFS gateways with parallel HEAD requests.

6

Result — Return sink-result with enclosure URL, IPFS CID, onion URL, feed URL, warnings.

Idempotency — re-running publish for same (podcast_id, episode.guid) updates in place. Partial failure — IPFS and Tor failures are non-fatal; captured in warnings.


Status Matrix

RSS 2.0 + iTunes namespaceProduction-ready
Podlove chapters + VTT transcriptsProduction-ready
Cloudflare R2 + Workers deliveryProduction-ready
Bunny.net as CDN alternativeProduction-ready
Filebase / Pinata IPFS archive layerProduction-ready
IPFS as primary deliveryExperimental
Tor `.onion` enclosure mirrorExperimental
Tor RSS in podcast appsNot viable
HLS for podcastNiche

Open Questions

  1. Analytics — IAB Tech Lab v2 Podcast Measurement compliance? Requires Range-request deduplication in Workers.
  2. Ad insertion — DAI in scope? If yes, HLS path becomes mandatory.
  3. Multi-show per tenantpodcast_id maps 1:1 with tenant or N:1?
  4. GDPR + IPFS — Unpin works on pinning services; DHT echoes may persist.
  5. Value4Value<podcast:value> blocks? Requires per-tenant Lightning endpoint.