{"slug": "build-a-crash-resistant-ai-podcast-production-pipeline-on-telnyx-edge", "title": "Build a Crash-Resistant AI Podcast Production Pipeline on Telnyx Edge", "summary": "A developer built Show Wrap Desk, a TypeScript application on Telnyx Edge Compute that turns a podcast recording into a transcript, chapters, show notes, and a trailer through a durable, resumable pipeline. The workflow is owned by one Stateful Actor per show, storing episodes, chapters, and assets in embedded SQL tables so completed stages survive later failures, with each stage re-armed via a stable scheduled task ID. Transcription uses the Telnyx Speech-to-Text API with Deepgram Nova-3, chapter boundaries are detected locally from speaker turns and 60-second silences, and chapter titles and show notes are generated via Telnyx AI Inference using zai-org/GLM-5.3-Flash.", "body_md": "Podcast post-production is rarely one operation. Before an episode can be published, someone must transcribe the recording, identify chapters, write show notes, create promotional copy, and produce a trailer. Each step depends on the one before it, which makes the workflow vulnerable to interruptions.\n\nIf processing fails after transcription, should the application transcribe the entire recording again?\n\nI built [Show Wrap Desk](https://github.com/team-telnyx/telnyx-code-examples/tree/main/show-wrap-desk) to explore a more durable approach.\n\nIt is a TypeScript application running on Telnyx Edge Compute that turns one podcast recording into:\n\nThe workflow is owned by one Stateful Actor per show, so completed stages remain recorded when later work fails.\n\nA producer starts the workflow with one request:\n\n```\ncurl -X POST https://<your-worker>/wrap \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"show\": \"engineering-notes\",\n    \"audioUrl\": \"https://example.com/episode.mp3\"\n  }'\n```\n\nThe endpoint immediately returns an episode ID and a `202 Accepted` response while the actor continues processing:\n\n```\ntranscribing → chapterizing → notes → wrapped\n```\n\nYou can inspect progress at any time:\n\n```\ncurl \"https://<your-worker>/wrapstatus/<episodeId>?show=engineering-notes\"\n```\n\nThe worker derives a deterministic actor name from the show:\n\n``` js\nconst desk = env.DESKS.idFromName(`show:${show}`);\nconst result = await desk.onWrap(show, audioUrl);\n```\n\nEvery episode submitted for the same show reaches the same `WrapDesk` actor.\n\nThe actor stores its workflow data in embedded SQL tables:\n\n`episodes` tracks status, errors, and completion times.`chapters` stores titles and timestamps.`assets` stores transcripts, show notes, and trailer audio.\nThis gives the workflow a durable ledger without requiring a separate orchestration database.\n\nEach episode is processed by a scheduled task with a stable ID:\n\n```\nawait this.schedule(\n  0,\n  \"wrapTick\",\n  { episodeId },\n  { id: `wrap:${episodeId}` }\n);\n```\n\nScheduling the same ID again replaces the pending task instead of creating another copy.\n\nAfter each successful stage, the actor updates the episode status and re-arms that task for the next stage. If the same audio URL is submitted again while processing is incomplete, the actor finds the existing episode and resumes it.\n\nThe individual stages also check for persisted output before doing work. A stored transcript is not transcribed again, existing chapters are preserved, and generated notes or trailer audio are reused.\n\nA failure can repeat the currently executing external operation if it occurred before the result was saved. However, completed and persisted stages are not restarted.\n\nThe first stage downloads the recording and submits it to the Telnyx Speech-to-Text API using Deepgram Nova-3:\n\n``` js\nconst form = new FormData();\n\nform.append(\"file\", blob, \"episode.mp3\");\nform.append(\"model\", \"deepgram/nova-3\");\nform.append(\"response_format\", \"verbose_json\");\nform.append(\n  \"model_config\",\n  JSON.stringify({\n    diarize: true,\n    smart_format: true,\n    punctuate: true,\n  })\n);\n```\n\nThe response includes word-level timestamps and speaker labels. The actor normalizes those words and stores them as the transcript asset before advancing the episode.\n\nThe application groups consecutive words from the same speaker into turns. A silence longer than 60 seconds begins a new chapter:\n\n``` js\nconst turns = buildTurns(words);\nconst chapters = splitIntoChapters(turns, 60);\n```\n\nBoundary detection happens locally, so the application does not need an AI request to determine every timestamp.\n\nTelnyx AI Inference then receives short summaries of the resulting sections and returns chapter titles. The sample uses `zai-org/GLM-5.3-Flash` through the Edge Compute `TELNYX` binding.\n\nThe next inference request creates Markdown show notes containing:\n\nThe transcript sent to the model is bounded to keep the example inside a manageable context window. A production implementation should introduce chunking or hierarchical summarization for long recordings.\n\nThe model selects a promising chapter and writes a trailer script capped at 400 characters.\n\nThat script is sent to the Telnyx Text-to-Speech WebSocket:\n\n```\nsocket.send(JSON.stringify({ text: \" \" }));\nsocket.send(JSON.stringify({ text: script }));\nsocket.send(JSON.stringify({ text: \"\" }));\n```\n\nThe actor collects base64 audio frames until the service sends:\n\n```\n{ \"isFinal\": true }\n```\n\nThe sample defaults to `azure.en-US-AvaMultilingualNeural`, but `HOST_VOICE` can be changed to another supported voice.\n\nThe project does not automatically clone the podcast host’s voice from the submitted recording. A custom or cloned voice must be configured separately.\n\n```\ngit clone https://github.com/team-telnyx/telnyx-code-examples.git\ncd telnyx-code-examples/show-wrap-desk\n\nnpm install\ncp .env.example .env\n```\n\nAdd your Telnyx API key, then generate the bindings and deploy:\n\n```\nnpm run types\nnpm run deploy\n```\n\nSet the generated worker URL as `DEPLOY_URL` and run:\n\n```\nnpm run bootstrap\n```\n\nThe included demo uses a public-domain LibriVox recording.\n\nBefore using this architecture in production, add authentication, audio-size limits, URL validation, retention controls, workflow telemetry, and human review for generated promotional content.\n\nLarge transcripts and audio files should also move to durable object storage instead of being kept directly in actor SQL.\n\nThe reusable idea is bigger than podcasting:\n\nThat pattern can support transcription batches, media processing, document enrichment, report generation, and other long-running AI workflows.\n\nThe full source is available here:\n\n[https://github.com/team-telnyx/telnyx-code-examples/tree/main/show-wrap-desk](https://github.com/team-telnyx/telnyx-code-examples/tree/main/show-wrap-desk)", "url": "https://wpnews.pro/news/build-a-crash-resistant-ai-podcast-production-pipeline-on-telnyx-edge", "canonical_source": "https://dev.to/sonam_gupta_dba00ec9473e5/build-a-crash-resistant-ai-podcast-production-pipeline-on-telnyx-edge-1c40", "published_at": "2026-10-15 22:36:03+00:00", "updated_at": "2026-10-15 22:58:58.121873+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-infrastructure", "natural-language-processing"], "entities": ["Telnyx", "Show Wrap Desk", "Telnyx Edge Compute", "Deepgram Nova-3", "zai-org/GLM-5.3-Flash", "TypeScript"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/build-a-crash-resistant-ai-podcast-production-pipeline-on-telnyx-edge", "markdown": "https://wpnews.pro/news/build-a-crash-resistant-ai-podcast-production-pipeline-on-telnyx-edge.md", "text": "https://wpnews.pro/news/build-a-crash-resistant-ai-podcast-production-pipeline-on-telnyx-edge.txt", "jsonld": "https://wpnews.pro/news/build-a-crash-resistant-ai-podcast-production-pipeline-on-telnyx-edge.jsonld"}}