Bước 7 — Generate TTS cho từng scene Tức là sau khi: • bước 5 đã có character ref • bước 6 đã có scene images + thumbnails thì bước 7 sẽ: • lấy scene.narration của từng scene • generate audio TTS riêng cho từng scene • lưu thành các file audio scene để dùng cho bước 8 compose master narration ─── Mục tiêu của bước 7 • mỗi scene có 1 file TTS riêng • giọng đọc đúng style kể chuyện đã khóa: • chậm hơn • rõ hơn • có ngắt nghỉ tốt • narration phải bám đúng nội dung source • không dùng scene.summary để đọc • không tự rút gọn nếu sếp chưa duyệt ─── Input của bước 7 • script/scenes.json • scene.narration từng scene • metadata project nếu cần • voice template đã duyệt ─── TTS provider chuẩn Main: • OmniVoice http://192.168.1.201:3900/generate Ref assets chuẩn: • /data/video-pipeline/Youtube-Video-Maker/data/voices/template1/refaudio.mp3 • /data/video-pipeline/Youtube-Video-Maker/data/voices/template1/reftext.txt ─── Output của bước 7 Ví dụ: • audio/scenes/scene_001.wav • audio/scenes/scene_002.wav • ... • manifest/log TTS nếu project có ghi Lưu ý: • OmniVoice có thể trả nội dung WAV/PCM dù tên request nhìn như mp3 • phải probe/kiểm format thật, lưu đúng đuôi phù hợp, thường là .wav ─── Rule quan trọng của bước 7 • 1 scene = 1 TTS file • đọc theo scene.narration làm source nội dung • riêng payload text gửi sang OmniVoice phải chuẩn hóa chữ thường để tránh lỗi nhấn/kéo âm với chữ hoa tiếng Việt • sub, scenes.json, manifest và text hiển thị vẫn giữ nguyên casing gốc; chỉ lowercase phần gửi TTS • không lấy raw ASR transcript làm source đọc • không lấy summary làm source đọc • chưa đến bước master audio ở đây • bước 7 chỉ là scene-level TTS ─── Bước 7 chưa làm gì Bước 7 chưa: • compose master narration • chưa split render parts • chưa tạo subtitles • chưa render video Những phần đó là bước sau: • bước 8: compose master narration trên worker • bước 9 trở đi: probe / ASR / subtitle / part split / render ─── Một dòng checklist ngắn 7. Generate TTS audio for each scene individually from scene.narration using the approved narration voice and pacing, saving one clean audio file per scene for later master narration composition. Sếp, cách tạo TTS qua OmniVoice trong workflow hiện tại là như này. 1. Endpoint dùng Main TTS: • http://192.168.1.201:3900/generate Theo policy đã khóa: • OmniVoice là TTS main mặc định • ref chuẩn nằm ở: • /data/video-pipeline/Youtube-Video-Maker/data/voices/template1/refaudio.mp3 • /data/video-pipeline/Youtube-Video-Maker/data/voices/template1/reftext.txt Source: /home/onepiece/.openclaw/workspace/MEMORY.md ─── 2. Input cần có cho mỗi scene Mỗi scene TTS cần 3 thứ chính: 1. text • lấy từ scene.narration • không lấy scene.summary 2. ref_audio • file giọng mẫu • mặc định: /data/video-pipeline/Youtube-Video-Maker/data/voices/template1/refaudio.mp3 3. ref_text • transcript của ref voice • mặc định: /data/video-pipeline/Youtube-Video-Maker/data/voices/template1/reftext.txt ─── 3. Cách gọi chuẩn Về logic, mỗi scene sẽ gọi 1 request riêng tới OmniVoice. Pseudo flow: 1. đọc scene.narration 2. normalize text nếu cần • ví dụ số La Mã kiểu thế kỷ X → thế kỷ mười 3. đọc reftext.txt 4. gửi request tới /generate 5. nhận audio output 6. probe format thật 7. lưu bằng đuôi đúng, thường là .wav ─── 4. Payload khái niệm Dạng body gửi đi sẽ theo ý này: { "text": "Nội dung narration của scene", "ref_audio": "/data/video-pipeline/Youtube-Video-Maker/data/voices/template1/refaudio.mp3", "ref_text": "nội dung đọc từ reftext.txt" } Nhưng lưu ý rất quan trọng: • đây là payload logic • còn đúng field name / kiểu gửi cụ thể thì phải theo API thật của OmniVoice service • policy hiện tại khóa ở mức workflow là: • endpoint • refaudio • reftext • 1 scene = 1 request • output cần kiểm format thật ─── 5. Ví dụ cụ thể cho 1 scene Ví dụ scene narration là: Ngô Quyền không chỉ là một vị tướng tài, mà còn là người nhìn ra quy luật của dòng sông và vận mệnh của đất nước. Thì request logic sẽ là: { "text": "Ngô Quyền không chỉ là một vị tướng tài, mà còn là người nhìn ra quy luật của dòng sông và vận mệnh của đất nước.", "ref_audio": "/data/video-pipeline/Youtube-Video-Maker/data/voices/template1/refaudio.mp3", "ref_text": "" } Output lưu kiểu: • audio/scenes/scene_001.wav ─── 6. Rule bắt buộc khi dùng OmniVoice • dùng scene.narration làm text nguồn • không dùng scene.summary • không tự ý rút gọn narration • 1 scene = 1 file TTS • output phải kiểm tra format thật vì OmniVoice có thể trả WAV/PCM dù tên file nhìn như mp3 • nếu format thật là wav thì phải lưu .wav