Flow Learning System

io.github.ghlee0786由 GitHub 帳號 ghlee0786 發布v0.1.0更新於 Oct 24, 2026

Build motion-graphics lessons with sentence-synced TTS for any subject: one sentence, one scene.

概覽

AI 產生的概覽

以動作圖像與語音旁白製作教材的 MCP 伺服器,讓助理撰寫、驗證並建置逐句同步的 HTML 課程。

可以做什麼
取得課程撰寫指南,並建立課程、讀取與儲存課程、檢視課程狀態與驗證課程內容。以 Blender 場景腳本渲染 3D 插圖並取得標記點的座標,列出課程素材與其標記點。預覽語音朗讀句子、登錄英文詞彙的韓文讀音,並合成課程語音與時間表。執行範例程式並比對畫面主控台輸出,最後建置成單檔 HTML 教材。
適用情境
當你想把某個主題的課程做成帶旁白的動態圖像教材,並希望由 AI 撰寫課程 JSON、驗證內容、產生語音與建置單檔 HTML 時使用。適合數學、科學、語言、生物與程式教學等需要圖形、公式或程式碼同步動畫的內容。
執行需求
需在本機以 Python 3.10 以上執行,並以 pip 安裝套件。語音合成需 Supertonic(首次執行會從 Hugging Face 下載模型),存成 mp3 需 ffmpeg。3D 插圖需 Blender 3.6 以上,不在 PATH 時以 FLS_BLENDER 指定路徑;驗證 C# 範例需 Mono 或 .NET SDK。
安裝前請注意
工具會寫入課程資料夾,包括課程檔、素材、音訊與建置輸出,並可能執行 AI 撰寫的 Blender 場景腳本與範例程式碼,請先確認內容再執行。首次使用會從 Hugging Face 下載模型,需網路連線。未宣告任何驗證或環境變數以外的憑證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Flow Learning System,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Flow Learning System

English · 한국어 · 日本語 · 简体中文

A learning system built on motion graphics and TTS. It works for any subject: math, science, English, biology, programming, and more. Write a lesson as JSON data and each sentence becomes one scene. The result is a single-file HTML textbook in which graphs, equations, sentence parts, 3D illustrations, and code move on screen the moment the voice starts reading the sentence they belong to. An AI uses MCP tools to write the textbook, check it, run its example code to verify the output, render 3D illustrations with Blender, record the narration, and build it. The bundled TTS (Supertonic) currently voices Korean and English, and the sample courses are in Korean.

[Math: translating a quadratic function]
Math · Translating a quadratic function
The curve slides into its new position, and the changing part of the equation is highlighted
[Science: forces on an incline]
Science · A block on an incline
On top of a Blender render, gravity splits into two components that grow out of it
[English: the passive voice]
English · Forming the passive voice
Words move to new positions, and example sentences are read by an English voice
[Biology: the animal cell]
Biology · Structure of the animal cell
Zooms into a 3D cross-section of the cell, pointing out organelles one by one

[Programming: C# arrays]
Programming · Lesson 7 (Arrays) of a 17-lesson C# syntax course — current-line highlighting, array cells filling in, an execution trace table, collapsible contents and script panels


Core idea: one sentence = one scene

[Syncing narration and scenes]

  • Each say in a lesson is one scene. A scene bundles the script sentence, a large key phrase, and the visuals for that moment (graph, equation, sentence parts, image, code, variables…).
  • Narration is synthesized sentence by sentence and concatenated, and the start time of each sentence is recorded in timing.json.
  • The player reads the audio's current playback position every frame and picks the scene from it. Changing the playback speed or jumping to the middle never puts the picture and the voice out of sync.

Example courses

SubjectCourseScenesVisuals usedWhat to look for
Mathexamples/math-quadratic13plot, math, tblA curve with the same name morphs between scenes, so the translation is visible
Scienceexamples/physics-incline12img (3D render), math, bars, plotArrows grow toward force endpoints computed in 3D; zoom
Englishexamples/english-passive12tokens, example-sentence panel, tbl, flowWord chunks move to new positions; `{en
Biologyexamples/biology-cell13img (3D render), flow, cardsOrganelle labels move around as the view zooms into the cell cross-section
Programmingexamples/csharp-grammar321 (17 lessons)Code, variables, arrays, stack/queue/dictionary, consoleAll 48 examples are actually run and compared against the on-screen output

Adding 3D illustrations with Blender

[Blender render and hotspots]

The render_3d tool runs an AI-written Blender scene script headlessly and renders it with Cycles. When the script marks a 3D position with spot("name", (x, y, z)), the tool computes where that point lands in the perspective-projected image and saves it alongside the render. Lessons then refer to those names for labels, zoom centers, and arrows.

python
# Block on an incline — compute the endpoints of gravity and its two components as 3D vectorsth = math.radians(30)d = V3((math.cos(th), 0, -math.sin(th)))   # down-slope directionn = V3((math.sin(th), 0, math.cos(th)))    # normal to the inclinespot("block", C)spot("g_tip", C + V3((0, 0, -2.6)))                 # gravity mgspot("par_tip", C + d * 2.6 * math.sin(th))         # mg sinθspot("perp_tip", C - n * 2.6 * math.cos(th))        # mg cosθ
json
{"img": ["assets/incline.png", {  "spots": {"theta": {"label": "θ = 30°"}},  "arrows": [{"from": "block", "to": "g_tip", "label": "mg", "c": "bad"},             {"from": "block", "to": "par_tip", "label": "mg sinθ", "c": "g1"}],  "zoom": 1.35, "focus": "block"}]}

Because the arrow tips are points computed in 3D, they line up exactly with the rendered incline. Scene scripts are kept in assets/src/, so they can be re-rendered at any time.

Screen layout

[Three-column layout]

AreaContents
Left: ContentsLessons and sections. Collapsible; clicking a section jumps to that scene
Center: StageKey phrase + left panel (code or example sentences, with the current line highlighted) + visuals. Always dark, regardless of theme
Right: ScriptAbout 1/5 of the screen. Highlights the sentence being read; clicking a sentence plays from there. Collapsible
Bottom: TimelineProgress bar divided by scene

The top bar holds only lesson navigation, play, scene navigation, and playback speed (0.75×–2×). On phones, the contents and script panels become drawers that open over the stage.

Motion rules

[Motion rules]

When the scene changes, on-screen elements are matched by name (key) and animated. No animation needs to be specified separately: changing the data is enough to produce motion.

MotionWhenExample
SlideAn element with the same name is in a different positionArray sorting, pointer i, words moving in the passive voice
MorphThe coordinates of a curve, point, or line with the same name changeTranslating a parabola, changing its width
Fly inA source cell is given with fromanswer[(i + k) % n] = arr[i]
GrowA new arrow appearsResolving a force into components
Zoom / panAn image's zoom or focus changesPointing out cell organelles
Blink · ScatterOnly the value changes · element disappearsVariable values, Pop

Anatomy of a lesson

[Mapping JSON ops to the screen]

json
{  "id": 1, "group": "수학", "title": "이차함수의 평행이동",  "ops": [    {"op": "part", "title": "x축 방향으로 평행이동"},    {"op": "say", "head": "{m|y = (x - 2)^2} : 오른쪽으로 2",     "text": "x 자리에 x 빼기 2를 넣으면 그래프 전체가 오른쪽으로 2만큼 미끄러집니다.",     "board": {"seq": [       {"plot": [{"curves": [{"fn": "(x-2)**2", "c": "g1", "key": "p"}],                  "points": [{"x": 2, "y": 0, "label": "꼭짓점 (2, 0)", "key": "v"}]}]},       {"math": [["y = x^2", "y = (x - 2)^2"], {"hl": [1]}]}]}}  ]}

The sample courses are narrated in Korean; {en|…} segments switch to an English voice.

The ops before a say build up the screen state, and the say captures that moment, together with its sentence, as a scene. The 22 ops, 24 widgets, and sentence markup ({m|equation}, {en|English}, [[written form|spoken form]]) are documented in the authoring guide (in Korean). The MCP authoring_guide tool returns the same content.

Workflow

[Workflow]

mermaid
sequenceDiagram    participant U as User    participant AI as AI (Claude, etc.)    participant M as Flow Learning System MCP    participant F as Course folder    U->>AI: "Make a lesson on cell organelles"    AI->>M: authoring_guide    AI->>M: course_init    AI->>M: render_3d(cell scene script)    M->>F: assets/cell.png + hotspot coordinates    AI->>M: lesson_save(lesson JSON)    M-->>AI: Validation results (missing hotspots, hard-to-read words …)    AI->>M: speech_preview → pronunciation_add    AI->>M: code_verify (subjects with code)    AI->>M: audio_synthesize    M->>F: audio/l01.mp3 + timing.json    AI->>M: course_build    M->>F: dist/index.html    U->>F: Open with fls serve

What the checks catch:

  • Validation: unknown ops or widgets, hotspots that don't exist in the image, scenes that try to highlight lines not in the code, English words the TTS can't read
  • Code verification: actually compiles and runs each example and compares it character by character with the on-screen console output (C#: Mono or .NET SDK; Python)
  • Reading preview: 17개 → 열일곱 개 (native Korean counting), 19.6 → 십구 점 육 (Sino-Korean "nineteen point six"), 8분의 1 → 팔분의 일 ("one eighth"), {en|…} → English voice

Installation

bash
git clone https://github.com/ghlee0786/flow-learning-system.gitcd flow-learning-systempip install -e ".[tts]"
RequirementUsed forWithout it
Python 3.10+Everything—
Supertonic ([tts])Korean and English speech synthesis. Downloads the model from Hugging Face on first runThe textbook runs without audio, using estimated timings
ffmpegSaving as mp3Saves as wav
Blender 3.6+render_3dOnly 3D illustrations are unavailable. If it is not on PATH, set FLS_BLENDER to the executable path
Mono or .NET SDKVerifying C# examplesOnly C# verification is skipped

Registering the MCP server

There is no need to keep the MCP server running. Register it once with your client, and the AI launches it on its own whenever it uses a tool (stdio).

Claude Code

bash
claude mcp add flow-learning-system -- python -m flow_learning_system.server

Claude Desktop (claude_desktop_config.json)

json
{  "mcpServers": {    "flow-learning-system": {      "command": "python",      "args": ["-m", "flow_learning_system.server"],      "env": { "FLS_BLENDER": "C:\\Program Files\\Blender Foundation\\Blender 4.2\\blender.exe" }    }  }}

On Windows, if python points to a different environment, use the full path to python.exe in the virtual environment where you installed the package.

Tools (13)

ToolWhat it does
authoring_guideLesson format, widgets, motion rules, how to write sentences
course_init / course_statusCreate a new course / per-lesson scene count, issue count, and audio status
lesson_get / lesson_saveRead a lesson / validate and save it (not saved if there are errors)
lesson_validateValidation
render_3dBlender scene script → image + hotspot coordinates
assets_listThe course's images and their hotspot names and coordinates
speech_previewThe exact sentences the TTS will read for each scene
pronunciation_addRegister Hangul readings for English words
code_verifyCheck that example code output matches the on-screen console output
audio_synthesizeLesson audio and timing table (changed lessons only)
course_builddist/index.html + audio + images

Command line

bash
fls validate examples/biology-cell              # validationfls render   examples/biology-cell --name cell --script scene.py   # Blender renderfls speech   examples/english-passive --lesson 1   # TTS reading previewfls verify   examples/csharp-grammar            # run and verify example codefls audio    examples/math-quadratic            # speech synthesisfls build    examples/math-quadratic            # dist/index.htmlfls serve    examples/math-quadratic            # open locally (also from phones on the same Wi-Fi)fls all      examples/physics-incline           # validate → verify → audio → build

A built textbook consists only of index.html plus the audio/ and assets/ folders, so it works without a server. It can be uploaded as-is to static hosting such as GitHub Pages. Audio files are not included in the repository. Generate them with fls audio <course>.

Folder structure

src/flow_learning_system/  server.py      MCP server (13 tools)  cli.py         fls command  lesson.py      Lesson ops interpretation · validation (same rules as the player)  speech.py      Script → TTS sentences (code-term readings, Korean number reading, English segments)  tts.py         Supertonic synthesis · per-sentence timing · cache  render.py      Blender rendering · hotspot projection  verify.py      Example code execution (C#: Mono/.NET, Python)  build.py       Single-file HTML build  guide.md       Lesson authoring guide  player/        Player (core.js equations/graphics, lesson.js scene builder/widgets, interp.js JSON interpretation, app.js playback/sync/motion)examples/                  Math · science · English · biology · C# example courses (3D scene scripts in assets/src/)docs/                      Authoring guide, README figurestools/                     README figure generators, legacy JS lesson convertertests/                     pytest

License

MIT. The Supertonic Python package used for speech synthesis is MIT-licensed and its model is under the OpenRAIL license; neither is included in this repository (the model is downloaded on first run).

來源:README.md,提交 5b7488d

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

1
  1. v0.1.0最新Oct 24, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分