<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Henry Yan</title>
    <description>The latest articles on DEV Community by Henry Yan (@chao_yan_0eca708448360655).</description>
    <link>https://dev.to/chao_yan_0eca708448360655</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2510451%2Fa51f238b-b89b-432b-9270-258d042216a6.jpg</url>
      <title>DEV Community: Henry Yan</title>
      <link>https://dev.to/chao_yan_0eca708448360655</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chao_yan_0eca708448360655"/>
    <language>en</language>
    <item>
      <title>I Built a 26-Lesson Lab for Writing a Coding Agent by Hand</title>
      <dc:creator>Henry Yan</dc:creator>
      <pubDate>Tue, 10 Nov 2026 15:59:50 +0000</pubDate>
      <link>https://dev.to/chao_yan_0eca708448360655/i-built-a-26-lesson-lab-for-writing-a-coding-agent-by-hand-40mo</link>
      <guid>https://dev.to/chao_yan_0eca708448360655/i-built-a-26-lesson-lab-for-writing-a-coding-agent-by-hand-40mo</guid>
      <description>&lt;p&gt;A lot of agent tutorials stop at calling a chat API. When you try to build a coding agent that can read files, call tools, and stop at a permission boundary, the hard parts are usually engineering problems: when the loop should halt, how tool arguments are validated, how context is budgeted, what to do with timeouts and unknown side effects, and whether a hook or a prompt can override a rule that was supposed to deny the call.&lt;/p&gt;

&lt;p&gt;That is why I built &lt;strong&gt;AI Agent Engineering Lab&lt;/strong&gt;. The Chinese product name on the site is 「AI Agent 工程训练站」—literally a training workshop. The English subtitle in the header is AGENT ENGINEERING LAB. The site describes its aim in one sentence: write a coding agent in TypeScript and Node.js, and practice the engineering design (and the interview explanation) as you go. Each lesson is about fifteen minutes, and each one adds a verifiable capability to the same agent, from the model loop through to safe execution.&lt;/p&gt;

&lt;p&gt;The site is live at &lt;a href="https://agent-lab.umic.io" rel="noopener noreferrer"&gt;https://agent-lab.umic.io&lt;/a&gt;. The UI is Chinese only; there is no English locale, and &lt;code&gt;/en&lt;/code&gt; is not a real page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcms.umic.io%2Fassets%2Fedc02a39-f376-45c0-8753-c1004258a240" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcms.umic.io%2Fassets%2Fedc02a39-f376-45c0-8753-c1004258a240" alt="Homepage of AI Agent Engineering Lab. The hero title is “Build a Coding Agent by Hand,” with a diagram of propose, authorize, execute, and observe." width="1600" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it exists, and who it is for
&lt;/h2&gt;

&lt;p&gt;The homepage frames the path as “from the model loop to safe execution.” Lessons are grouped by theme, last about fifteen minutes, and include an interview-style follow-up question. I wanted a place that is useful both for people implementing a runtime and for people who need to explain the mechanisms clearly.&lt;/p&gt;

&lt;p&gt;If you already know some TypeScript or Node.js and want to write the loop, the tool contract, the context budget, and the permission boundary yourself—rather than only driving an existing product—this is the intended starting point. Early lessons are labeled foundational; later ones are intermediate or challenge-level. You do not need a particular model vendor to begin. Many exercises can be checked with a fake model.&lt;/p&gt;

&lt;p&gt;It is probably not the right fit if you want a one-click agent generator, or if you do not want to read TypeScript. Some lessons are reading, comparison, and written exercises. Only a few include an in-browser editor.&lt;/p&gt;

&lt;h2&gt;
  
  
  The path: ten themes, twenty-six lessons
&lt;/h2&gt;

&lt;p&gt;The catalog states the shape plainly: ten themes, twenty-six lessons, about fifteen minutes each. Lessons have prerequisites, and the site can show the dependency map. The first eight themes follow one project line. The last two are a product teardown and an architecture close reading.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcms.umic.io%2Fassets%2Fe6019d4c-7829-4493-8a70-0df054d10d51" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcms.umic.io%2Fassets%2Fe6019d4c-7829-4493-8a70-0df054d10d51" alt="The course catalog, showing ten themes and twenty-six lessons, including Agent Architecture, Tool Use, and Context Management." width="1600" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first eight themes are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Agent architecture&lt;/strong&gt; — 01, write the agent loop; 02, separate the model protocol from the runtime. A “find the failing test” task is split into a model decision, tool execution, and a result that is sent back. Fake models, a Claude API, and local inference are meant to share one runtime contract.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool use&lt;/strong&gt; — 03, define the tool contract and error semantics; 04, scope file reads. The &lt;code&gt;read_file&lt;/code&gt; tool gets validation and authorization, and read-only access stays inside a controlled fixture workspace.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context management&lt;/strong&gt; — 05, budget context and trim tool output; 06, compact history while keeping evidence pointers. Rules, the task, evidence, and reserved output get a budget before a request is sent, and later turns should still be able to trace the important conclusions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory&lt;/strong&gt; — 07, keep session state and long-term memory apart; 08, check freshness and provenance on retrieval, so a stale memory is not treated as the current configuration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflow orchestration&lt;/strong&gt; — 09, model a patch flow as a state machine; 10, bind approval to a patch version, so the patch that is written is the one the user reviewed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evaluation&lt;/strong&gt; — 11, build a regression set from task end states; 12, use traces to locate the failing step, instead of scoring only the final sentence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reliability&lt;/strong&gt; — 13, bound timeouts, retries, and cancellation; 14, design idempotent recovery for steps with side effects, distinguishing “not run,” “already applied,” and “unknown.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safety&lt;/strong&gt; — 15, reject arbitrary commands and indirect prompt injection; 16, finish a safety regression and a system-design recap, showing that the agent can complete a task and also stop at a boundary.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The ninth theme, &lt;strong&gt;tearing down mainstream agent products&lt;/strong&gt; (lessons 17–21), looks at permissions, sessions, and tickets: deny rules versus hooks, rebuilding the active branch from a JSONL tree, last-match permission rules and a sub-agent’s own table, admission rules and ticket stages, and finally a review of your own harness against those boundaries.&lt;/p&gt;

&lt;p&gt;The tenth theme, &lt;strong&gt;a close reading of Super-Agent architecture&lt;/strong&gt; (lessons 22–26), is labeled on the site as a study of a prototype, not an official product. It starts with why the design splits a Router from a Worker, then covers admission rules before the model, ticket stages and the two sessions, recording effects before they run, and the authorization boundary—including designs that appear in an article but are not implemented in the prototype.&lt;/p&gt;

&lt;h2&gt;
  
  
  “How mainstream products do it” is a documented comparison
&lt;/h2&gt;

&lt;p&gt;Lessons 01 through 16 each include a section titled “How mainstream products do it” (主流产品怎么做). The references are four publicly documented systems: Claude Code, Pi, OpenCode, and DeepSeek Super-Agent. The last of these is labeled in the course as a &lt;strong&gt;research prototype, not an official product&lt;/strong&gt;. It should not be described as a shipping official product.&lt;/p&gt;

&lt;p&gt;Each note has a source link and a checked-on date. When I wrote this, that date on the site was 10 November 2026. The point of the section is to read the boundaries as the docs state them, then judge your own runtime against those boundaries—not to grade a product by what a model says about itself.&lt;/p&gt;

&lt;p&gt;One clarification: not every lesson quotes all four products. A lesson cites the documents that are relevant to that topic—the loop and model adapters in one, compaction settings in another, permissions and hooks in a third. Lesson 16 also includes a comparison table that puts the loop, tools, and permissions side by side.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcms.umic.io%2Fassets%2Fe11c7d47-db94-4e96-8665-2efc0e6463e0" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcms.umic.io%2Fassets%2Fe11c7d47-db94-4e96-8665-2efc0e6463e0" alt="Lesson 16’s “How mainstream products do it” section, with notes on Claude Code, Pi, OpenCode, and DeepSeek Super-Agent, each with a source link and a checked-on date." width="1600" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lessons 17–21 turn some of those boundaries into standalone exercises: Claude Code’s deny and ask rules still override a PreToolUse allow; Pi rebuilds the active branch from a JSONL tree, and a compaction entry only replaces the prefix the model sees; OpenCode uses last-match rules, and a sub-agent has its own permission table; in the Super-Agent prototype, events pass code-level rules before a ticket stage. Those claims are the ones already sourced in the lessons. I am not adding new assertions about those products here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three lessons let you write TypeScript and run tests in the browser
&lt;/h2&gt;

&lt;p&gt;Lessons 01, 05, and 09 include an in-browser editor. You can write TypeScript and click “Run tests” without signing in, and without first setting up a local toolchain. The note under the editor is explicit: the code runs in the browser, cannot call this site’s APIs or the public network, and a single run lasts about three seconds at most.&lt;/p&gt;

&lt;p&gt;Under the hood, the learner’s TypeScript is compiled in the browser, then executed inside an iframe that allows scripts only, with the tests running in a Web Worker. The iframe does not share the page’s origin and has no network access. If a run overruns the deadline, the page aborts it. I wanted the exercises to be easy to start, without executing learner code on the site’s own servers.&lt;/p&gt;

&lt;p&gt;When every test passes, the lesson is marked complete. If you are signed in with GitHub, that status is written to your learning record. If you are not signed in, the result stays in the current browsing session; it will not survive a refresh or a new device until you sign in and save.&lt;/p&gt;

&lt;p&gt;Only these three lessons have a runnable editor today. The other lessons still have a concept, an example, a written exercise, acceptance checks, and an interview follow-up, but you complete them in your own environment or by working through the explanation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcms.umic.io%2Fassets%2Fbae45fc0-c6f2-4c03-b104-fc153a7be972" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcms.umic.io%2Fassets%2Fbae45fc0-c6f2-4c03-b104-fc153a7be972" alt="The in-browser exercise in lesson 01: a TypeScript editor, a Run tests button, and failing test results. The page states that the code runs in the browser, cannot reach this site’s APIs or the network, and is limited to about three seconds." width="1600" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The screenshot above is the starter for lesson 01. The template deliberately leaves the fake models unimplemented, so a first run fails—that is the exercise, not a site error. The tests pass once the diagnosing model and the loop budget are filled in.&lt;/p&gt;

&lt;h2&gt;
  
  
  After you sign in, progress syncs to Cloudflare D1
&lt;/h2&gt;

&lt;p&gt;You can browse the course and run the browser exercises without an account. The site says that signing in lets you sync learning records, and the header offers GitHub login. After you sign in, lesson status, exercise code, and completion records are stored in Cloudflare D1, so you can continue in another browser. Without a login, those records are not kept as durable, cross-device progress.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack, and a few design choices
&lt;/h2&gt;

&lt;p&gt;The site is a Next.js app, running on Cloudflare Workers through vinext. Learning records live in Cloudflare D1 and are accessed with Drizzle. GitHub login identifies the learner and syncs progress; it is not required to read the lessons.&lt;/p&gt;

&lt;p&gt;A few choices are worth spelling out.&lt;/p&gt;

&lt;p&gt;First, the course adds capabilities to one coding agent, instead of switching to an unrelated demo in every lesson. The homepage calls this the project mainline: each lesson adds something you can verify, and later lessons hang off those dependencies.&lt;/p&gt;

&lt;p&gt;Second, product comparisons and the architecture close reading are separate. Lessons 01–16 build the runtime and cite public docs; 17–21 turn selected boundaries into exercises; 22–26 close-read the Super-Agent research prototype, and they keep distinguishing designs described in an article from what the prototype actually implements.&lt;/p&gt;

&lt;p&gt;Third, learner code runs in a browser isolation layer, not on the server. No network access and a three-second timeout are part of that boundary.&lt;/p&gt;

&lt;p&gt;Fourth, DeepSeek Super-Agent is treated throughout as a research prototype. Lesson 22 explains the split: a long-lived Router (the main session) talks to the human and coordinates globally, and does not execute the task itself; a Worker isolated per ticket has its own session and directory, and is given the full tool set. That layer sits on DeepSeek Harness’s plugin architecture—model adapters, the tool registry, session logs, and the agent loop can all be plugins, and dsh-superagent is a plugin pack on that harness. The lesson also states that the article and the prototype are not the same thing, so a design from the article should not be described as a class that already exists in the prototype.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcms.umic.io%2Fassets%2Fe5d9a906-3fe2-4be1-ad04-036f7a54ebc2" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcms.umic.io%2Fassets%2Fe5d9a906-3fe2-4be1-ad04-036f7a54ebc2" alt="Lesson 22, “Why split a Router and a Worker”: the concept text and an architecture diagram showing the main session, the ticket, the Worker, and admission rules that run before the model." width="1600" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Current status and limits
&lt;/h2&gt;

&lt;p&gt;The site is live, and the homepage also works at a mobile width. The interface is Chinese only.&lt;/p&gt;

&lt;p&gt;A few other limits are worth knowing up front. Only lessons 01, 05, and 09 have runnable in-browser exercises. The product notes are dated, selective citations, not a complete review of any product. The Super-Agent lessons discuss a research prototype and a public article, not an official product manual. Completion status is not saved as durable progress unless you are signed in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcms.umic.io%2Fassets%2Fbae32e90-0eeb-4ba7-a80e-a5ac692e1dbf" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcms.umic.io%2Fassets%2Fbae32e90-0eeb-4ba7-a80e-a5ac692e1dbf" alt="The homepage at a mobile width: a Chinese UI, a GitHub sign-in entry, and the catalog line “ten themes · twenty-six lessons.”" width="1170" height="2532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to start
&lt;/h2&gt;

&lt;p&gt;Open &lt;a href="https://agent-lab.umic.io" rel="noopener noreferrer"&gt;https://agent-lab.umic.io&lt;/a&gt;. You can browse all twenty-six lessons without signing in, and start the in-browser exercise in lesson 01. Use GitHub login if you want the learning record to persist.&lt;/p&gt;

&lt;p&gt;I built the lab to break coding-agent engineering into exercises you can verify one step at a time: write the loop, then tools, context, orchestration, evaluation, reliability, and safety, and keep the public docs of existing systems in view. If you are building a similar runtime, start at lesson 01 and get the tests to pass.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>ai</category>
      <category>agents</category>
      <category>cloudflare</category>
    </item>
    <item>
      <title>ShengChang: Import a Novel Chapter, Get a Mixed Radio-Drama Episode</title>
      <dc:creator>Henry Yan</dc:creator>
      <pubDate>Tue, 03 Nov 2026 01:11:06 +0000</pubDate>
      <link>https://dev.to/chao_yan_0eca708448360655/shengchang-import-a-novel-chapter-get-a-mixed-radio-drama-episode-49ak</link>
      <guid>https://dev.to/chao_yan_0eca708448360655/shengchang-import-a-novel-chapter-get-a-mixed-radio-drama-episode-49ak</guid>
      <description>&lt;p&gt;Text-to-speech is basically solved for reading text out loud. Turning a story into something that sounds like a &lt;em&gt;radio drama&lt;/em&gt; is not. Once you try it, you notice that the voice model is the easy part. The hard part is everything around it: working out who says each line, keeping every character's voice the same across scenes, directing the delivery, and mixing dialogue with ambience and music so the result doesn't sound like a screen reader.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ShengChang&lt;/strong&gt; (声场) is my attempt at that whole job. It's a personal AI radio-drama workbench: import a novel chapter as a .txt file, get a directed, mixed episode. It runs on your own machine, it's MIT-licensed, and each character keeps one voice from the first scene to the last.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Homepage: &lt;a href="https://yanjiliang.github.io/shengchang-ai-studio/" rel="noopener noreferrer"&gt;https://yanjiliang.github.io/shengchang-ai-studio/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/yanjiliang/shengchang-ai-studio" rel="noopener noreferrer"&gt;https://github.com/yanjiliang/shengchang-ai-studio&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The reason is a bit personal. I'm a heavy audiobook fan, and at one point I wanted to do voice acting on the side. My own voice was never going to get me there, so the idea just sat. Over the last couple of years, voice models got good enough to clone a voice and take direction on emotion and pacing, and it clicked: if I can't perform the parts, maybe I can direct them.&lt;/p&gt;

&lt;p&gt;The name comes from acoustics. 声场 (shēngchǎng) means "sound field": how sound fills a space. In a good radio drama you can close your eyes and still tell who's standing where, how far away they are, and whether you're in a forest or a palace hall. That's the job I want this tool to do. Its own tagline puts it as 「让故事，有声有场」, roughly "give a story its voices, and the space they live in."&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;The pipeline looks like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;scene/line breakdown → per-character voice mapping → directed TTS → FFmpeg mix desk with sidechain ducking → loudness-normalized MP3&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The stack is plain on purpose: React + Vite for the desktop-first UI, Node.js + Express on the server, the built-in &lt;code&gt;node:sqlite&lt;/code&gt; module for storage, and FFmpeg/ffprobe for rendering. One thing to know up front: the UI and the sample content are Chinese only, and English support isn't on my plan yet.&lt;/p&gt;

&lt;p&gt;It's for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;people who want to turn a story they like into a multi-voice audio episode;&lt;/li&gt;
&lt;li&gt;developers who want to see a complete text-to-audio production pipeline, not just a TTS demo;&lt;/li&gt;
&lt;li&gt;anyone who'd rather keep manuscripts, voices, and API keys on their own machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;One-click episode.&lt;/strong&gt; One button runs five checkpointed stages: breakdown → preset voice mapping → batch generation → audio health check → episode export. Before it starts, you get an estimate (line count, characters, predicted cache hits). If a stage fails, you retry from that checkpoint. Re-runs only re-voice the lines you actually changed (text, emotion, speed, or locked voice). Everything else is reused.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Direction, not just text.&lt;/strong&gt; Every line can carry subtext, emotion, intensity, speed, and distance. ShengChang folds those into one voice instruction for the engine. For Breeze, ShengChang writes the instruction itself (emotion level + speed + subtext, max 300 characters). If a line has no direction at all, it sends an empty instruction, so you get a plain voice clone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Direction Lab.&lt;/strong&gt; Pick a line and render it three ways side by side in the Inspector. Takes are cached by their direction parameters, so when you apply the one you like and regenerate, it's an instant cache hit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Voices that stay put.&lt;/strong&gt; With a local Breeze server, you can clone a voice from a 5–30 second reference clip (10–30 s recommended), or design one from a text description, audition it, and lock it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A real mix desk.&lt;/strong&gt; Each scene gets its own timeline. Dialogue is sequenced automatically when you don't set in-points, and background beds can loop. Music and ambience duck under dialogue through FFmpeg sidechain compression. The master chain normalizes to a target loudness (−16 LUFS by default) with a −1 dBTP ceiling, and exports 48 kHz stereo MP3 at 192 kbps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sound assets with provenance.&lt;/strong&gt; The app ships with 20 CC0 assets (ambience, foley, music beds) and recommends matches from each sound event's description, all computed locally. You can also plug in an AI SFX service or import your own files. Each export comes with a source list that groups every asset as built-in, AI-generated, or imported.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zero-key first run.&lt;/strong&gt; A fresh install seeds a sample project: an adapted excerpt from chapter 27 of &lt;em&gt;Journey to the West&lt;/em&gt; (public domain), condensed to 19 fully directed lines. It defaults to an offline demo engine, so the whole one-click pipeline runs end to end with no API key, no signup, and no cost. The idea is simple: the plumbing is real, and only the voice is a placeholder.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick start
&lt;/h2&gt;

&lt;p&gt;Requirements: Node.js 22.5+, with FFmpeg and ffprobe on your PATH.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install
&lt;/span&gt;npm run dev          &lt;span class="c"&gt;# workbench on http://127.0.0.1:4173&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This starts the web UI on &lt;code&gt;127.0.0.1:4173&lt;/code&gt; and a local model gateway on &lt;code&gt;127.0.0.1:4174&lt;/code&gt;. Then:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the sample project 「西游记 · 三打白骨精」.&lt;/li&gt;
&lt;li&gt;Go to 制作中心 (Production) → 一键成片 (one-click episode) and confirm the estimate.&lt;/li&gt;
&lt;li&gt;Come back to a mixed episode MP3 (with demo-engine tones).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For real voices, run the bundled Breeze TTS service. It currently needs an Apple Silicon Mac:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;breeze
uv venv &lt;span class="nt"&gt;--python&lt;/span&gt; 3.12 .venv
uv pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--python&lt;/span&gt; .venv/bin/python &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
.venv/bin/hf download mlx-community/Breeze-TTS-2-mlx &lt;span class="nt"&gt;--local-dir&lt;/span&gt; models/Breeze-TTS-2-mlx
./start.sh
curl &lt;span class="nt"&gt;-s&lt;/span&gt; http://127.0.0.1:4180/health
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open Settings, choose the local Breeze-TTS-2 engine, and set the address to &lt;code&gt;http://127.0.0.1:4180&lt;/code&gt;. To import your own novel (a .txt file), first add any OpenAI-compatible text model (base URL, key, model name) and click 测试连接 ("Test connection"). The import button stays locked until that test passes.&lt;/p&gt;

&lt;p&gt;You can also use Docker. The image includes Node 22 and FFmpeg, runs as a non-root user, and serves everything on one port, 4174:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker build &lt;span class="nt"&gt;-t&lt;/span&gt; shengchang &lt;span class="nb"&gt;.&lt;/span&gt;
docker run &lt;span class="nt"&gt;-p&lt;/span&gt; 4174:4174 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; shengchang-runtime:/app/.runtime &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; shengchang-config:/home/node/.shengchang &lt;span class="se"&gt;\&lt;/span&gt;
  shengchang
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Design decisions worth calling out
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Loopback only.&lt;/strong&gt; The server binds to &lt;code&gt;127.0.0.1&lt;/code&gt;, and &lt;code&gt;/api&lt;/code&gt; rejects any non-loopback &lt;code&gt;Host&lt;/code&gt; or &lt;code&gt;Origin&lt;/code&gt; header, which blocks cross-site form posts and DNS rebinding. Credentials live in &lt;code&gt;~/.shengchang/config.json&lt;/code&gt; with mode 0600. The browser never sees a key in plaintext; the UI shows only the last three characters. If you change an endpoint, the saved key is not sent to the new address.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No default provider.&lt;/strong&gt; The text model can be any OpenAI Chat Completions–compatible endpoint: a hosted API like DeepSeek or OpenAI, or a local server like Ollama, LM Studio, vLLM, or llama.cpp. You do need one to import your own novel, though: the current UI blocks the import until the connection test passes. (The server still has a rule-based breakdown fallback, but the current import flow doesn't reach it.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No silent engine switching.&lt;/strong&gt; If Breeze is unreachable, the UI tells you and offers a retry or a link to Settings. It never falls back to another engine, and never to a paid one. There's a dedicated test for this. I'd rather stop the pipeline than spend someone's money without asking.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Production plumbing.&lt;/strong&gt; Breakdown, generation, and export all run as persistent, resumable tasks in SQLite with stage checkpoints, so unfinished work goes back in the queue after a restart. Audio is cached by content: the same model, voice, text, and direction always reuse the same file. When the cache passes its size limit (50 GB by default), the least recently used entries are evicted, but files still referenced by a project are never deleted. When you edit a line, its old audio is marked stale instead of being quietly removed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tests that exercise the real chain.&lt;/strong&gt; Besides unit tests, &lt;code&gt;npm run test:e2e&lt;/code&gt; starts the actual server and runs generation and the one-click pipeline end to end. The mix tests render real timelines through FFmpeg and check duration and format with ffprobe. Both suites run in GitHub Actions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it stands
&lt;/h2&gt;

&lt;p&gt;This is an early project, and I'd rather say so up front:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The version is &lt;code&gt;v0.1.0&lt;/code&gt;, the license is MIT, and CI is passing.&lt;/li&gt;
&lt;li&gt;The local Breeze voice path, now the main engine, was merged in late October 2026.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;breeze/requirements.txt&lt;/code&gt; was pinned from a working environment but hasn't been tested on a clean machine. The 8-bit Breeze weights should save memory, but their quality and stability are untested.&lt;/li&gt;
&lt;li&gt;A real-voice demo episode isn't published yet. What runs today out of the box is the demo-engine version with placeholder tones.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What's next isn't a long feature list. The focus is &lt;strong&gt;output quality&lt;/strong&gt;: more accurate breakdowns, more natural delivery, and episodes that sound more like real radio drama.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trade-offs and limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real voices need Apple Silicon for now.&lt;/strong&gt; The Breeze service runs on MLX and the Metal GPU. Intel Macs, Linux, and Windows are untested and probably won't work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The hardware bar is real.&lt;/strong&gt; The bf16 weights are about a 7.1 GB download. A full episode peaks around 12 GB of memory, so 24 GB+ is recommended (16 GB is untested). My test machine was an M4 Pro with 48 GB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Breeze weights aren't open source.&lt;/strong&gt; They use the BreezeBlue Research and Non-Commercial License. ShengChang's code is MIT, but that doesn't cover the weights. The repo doesn't ship or redistribute them; you download them yourself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For commercial use&lt;/strong&gt;, there's an optional cloud engine (Doubao TTS from Volcengine) and a custom HTTP adapter for your own TTS service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breakdown needs a model with enough output room.&lt;/strong&gt; Each request asks for 8,192 output tokens. If your model's limit is lower, the output gets truncated, so pick a bigger model or import one chapter at a time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Importing your own novel needs a text model.&lt;/strong&gt; Zero-key mode only covers the bundled sample project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Breeze address is part of the cache key.&lt;/strong&gt; Change it, even just the port, and every line voiced by Breeze gets marked for regeneration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;If you want to hear a book you love as a radio drama, or you just want to see how a text-to-episode audio pipeline holds together, clone the repo and run the sample project. It takes no keys and a couple of commands.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/yanjiliang/shengchang-ai-studio" rel="noopener noreferrer"&gt;https://github.com/yanjiliang/shengchang-ai-studio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If it's useful, a star helps. Issues, Discussions, and PRs are all welcome.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>tts</category>
      <category>ffmpeg</category>
    </item>
  </channel>
</rss>
