Skip to content

Repository files navigation

🎙️ 3 AI Multi-Agent Podcast Studio (Truth OS)

Bilingual / ระบบปฏิบัติการนิเวศสถานีพ็อดคาสท์ 3 อัจฉริยะร่วมวิเคราะห์เชิงความจริง Translating pure visual atmospheres into organic tri-agent dialogue, utilizing analog radio aesthetics and the absolute logical laws of nature. การแปลงสัมผัสจากภาพทัศนียภาพสู่วงจรบทสนทนาทอล์กโชว์ 3 ทิศทาง บนสุนทรียวิทยุแอนะล็อกและกฎแก่นแท้แห่งตรรกะความจริงธรรมชาติ 1+1=2


📋 Overview / ภาพรวมโครงการ

3 AI Multi-Agent Podcast Studio (Truth OS) is a full-stack immersive generative radio ecosystem. By uploading any visual prompt, the system deploys a team of three distinct, specialized AI hosts that analyze components, write cohesive talk-show dialogue under strict JSON schemas, and synthesize expressive voices synchronized word-by-word with pulsing visualizers in real-time.

3 AI Multi-Agent Podcast Studio (Truth OS) คือระบบนิเวศสถานีวิทยุจำลองแบบ Full-stack ที่ขับเคลื่อนด้วยการจำลองบทสนทนาอัจฉริยะ 3 ทิศทาง เมื่อทำการป้อนรูปภาพต้นทาง ระบบจะปลุกพลังวิเคราะห์ภาพผ่านโมเดลสติปัญญาทางปัญญาและนำผู้ร่วมดำเนินรายการ 3 คาแรกเตอร์ที่มีอัตลักษณ์โดดเด่นมาร่วมถกเถียง แลกเปลี่ยนความรู้ และเรียบเรียงเสียงสังเคราะห์คำจัดเรียงแบบโอเวอร์เลย์เรียลไทม์


🏛️ Core Pillars & The 3 Intellectual Co-Hosts / 3 ขุนพลทางปัญญาผู้ร่วมรายการ

Our podcast ecosystem is steered by three specialized virtual agents, custom-mapped to high-fidelity Gemini Text-to-Speech voices:

ระบบพ็อดคาสท์ทำงานอิงตามบุคลิกภาพเฉพาะ 3 มุมมองหลักที่หนุนนำ ค้ำจุน และโต้แย้งกันอย่างมีเหตุผล พร้อมสอดแทรกความขบขันและจังหวะการรับส่งมุกที่สมจริงดังนี้:

1. 🎙️ Kore — Lead Host (ผู้ดำเนินรายการหญิง)

  • Role (TH): ผู้ดำเนินรายการและแกนหลักเชื่อมโยงความรู้สึก ทำหน้าที่กล่าวเปิดรายการ วิเคราะห์การจับคู่สี องค์ประกอบภาพ ทัศนียภาพเชิงอารมณ์ และขมวดปมดึงดูดใจผู้ฟัง
  • Voice Profile: Matched to voice model "Kore" (Bright, classically expressive, warm, and highly engaging).
  • Role (EN): Show anchor and emotional core. She guides the broadcast, analyzes general composition, lighting, style, color palettes, and emotional resonance.

2. 🛠️ Puck — Technical Specialist (แขกรับเชิญชาย/สายปฏิบัติการ)

  • Role (TH): แขกรับเชิญสายช่างเทคนิคผู้กระตือรือร้น เจาะลึกความสามารถเชิงกลไก โครงสร้างวัตถุ วัยสถาปัตยกรรม วิธีการลงมือประคองสร้าง และหลักฟิสิกส์ประยุกต์เชิงลึก
  • Voice Profile: Matched to voice model "Puck" (Conversational, energetic, fast-paced, and filled with micro-inflections).
  • Role (EN): Practical builder and technologist. He details the constructability, architectural layout, mechanical possibilities, materials, and active engineering within the scene.

3. 🍃 Zephyr — Knowledge & Philosophy Expert (แขกรับเชิญหญิง/สายทฤษฎี)

  • Role (TH): แขกรับเชิญฝ่ายทฤษฎี ปรัชญา และแก่นแท้เชิงตรรกศาสตร์ ค้นหาเหตุแห่งเหตุ วิเคราะห์ความจริงสัมบูรณ์ (Absolute Truth) และกฎเกณฑ์ธรรมชาติที่เที่ยงแท้ 1+1=2
  • Voice Profile: Matched to voice model "Zephyr" (Deep, soft, ethereal, and objective).
  • Role (EN): Philosophical analyst and logical scholar. She dissects the theoretical backend, foundational laws, conceptual origin, existential meaning, and natural mathematical reality of the setting.

🚀 Key Features / จุดเด่นเชิงนวัตกรรมและการพัฒนาระบบ

1. Structured Multi-Agent Dialogue API

  • EN: Enforces rigid JSON schema validation on Gemini 3.5-Flash to generate natural dialogue turns with strict typing. The co-hosts joke, contrast, and expand on each other's speeches rather than reading flat statements.
  • TH: ระบบการสกัดโครงสร้างบทสนทนาผ่าน JSON Schema บนหน่วยประมวลผล Gemini 3.5-Flash เพื่อสร้างบทพูดที่รับรับส่งกันอย่างลื่นไหล ตัวละครมีความขี้เล่น โต้เถียง และหยอกล้อกันอย่างเป็นธรรมชาติ

2. Multi-Speaker TTS Vector Queue

  • EN: Dynamically maps speaker turn IDs to specialized Text-to-Speech endpoints, decoding unsigned PCM (wav) buffers client-side using AudioContext. Implements dynamic gain adjustments and instant turn playback caching.
  • TH: ท่อลำเลียงข้อมูลแบบเสียงจัดสรรคิวเสียงพูดให้ตรงกับตัวละคร พร้อมดึงความสามารถของโมเดลสังเคราะห์เสียงแปลงเป็น PCM และถอดข้อมูลผ่าน Web Audio API สำหรับการขยายเสียงและการจัดคิวเล่นต่อเนื่องโดยปราศจากอาการติดขัด

3. Natural Conversational Pauses

  • EN: Inserts natural acoustic pauses (approx 400ms) between speaker changes to mimic the turn-taking rhythm and breath points of human participants.
  • TH: การจำลองจังหวะเว้นวรรคหายใจของมนุษย์ระหว่างผู้พูดประมาณ 400 มิลลิวินาที ทำให้ช่วงจังหวะเปลี่ยนผ่านของประโยคของตัวละครไม่มีอาการกลืนคำหรือพูดชนกันจนแข็งกระด้าง

4. Word-by-Word Karaoke Subtitles & Pulsing Glowing Rings

  • EN: Analyzes buffer playback durations to synchronize the current word over-lay. The visual preview active speaker box shifts chromatic colors in step with a custom CSS glitch-animation, and rotates neon rings based on high-frequency sound activity.
  • TH: การซิงก์บทบรรยายแบบเรียลไทม์คำต่อคำ (Karaoke Highlight) ซ้อนทับขอบกล่องพรีวิวด้วยอนิเมชัน border-glitch ไล่ระดับเฉดล้อตามคาแรกเตอร์ และประดับวงแหวนสัญญาณเสียงกะพริบเรืองแสงรอบตัวละครหลักที่กำลังแสดงสิทธิ์พูด

📊 System Benchmark / การเปรียบเทียบเชิงประสิทธิภาพ

Feature / หัวข้อเปรียบเทียบ Public Generic AI Podcasts / ทั่วไปในท้องตลาด Truth OS Multi-Agent / สถาปัตยกรรมความจริงร่วม
Dialogue Continuity / ความต่อเนื่องบทสนทนา Non-contextual random sentences / บทพูดสุ่มทื่อๆ Multi-role logical debates & witty counters / บทถกเถียงเชิงตรรกะระดับลึกและรับส่งมุก
Speaker Audio Integrity / คุณภาพและชนิดวิทยุ Flat single voice or generic reader / เสียงเดียวตลอดเล่ม Specialized 3 custom voice profiles (Kore, Puck, Zephyr) / 3 อัตลักษณ์เสียงพิเศษ
Realtime Visualizer Sync / การสอดคล้องแสงสัญญาณ Static waveform overlays / แถบคลื่นสังเคราะห์จำลอง High-frequency physical pulsing rings & active visualizers / วงแหวนสัญญาณกะพริบตามคลื่นเสียงจริง
Aesthetic Theme Coupling / อรรถรสของธีม Default UI template / บล็อกหน้าตาเรียบง่ายทั่วไป Complete analog-radio console styling / คอนโซลห้องอัดแอนะล็อกเรโทร-โมเดิร์นสุดประณีต

🛠️ Stack เทคโนโลยีหลัก (Tech Stack)

  • Generative & Reasoning Engine: Google Gemini 3.5-Flash
  • Audio Synthesis Interface: Google Gemini TTS API (gemini-3.1-flash-tts-preview)
  • User Interface & Layout: React 18 / Tailwind CSS / Space Grotesk & JetBrains Mono Fonts
  • Animation System: motion (by motion/react) for smooth layouts and fade-ins
  • Acoustic Playback Engine: Raw linear 16-bit PCM parser powered by Web Audio API (AudioContext, GainNode, AudioBufferSourceNode)

🔒 Security Guardrails & Data Protection / การรักษาความปลอดภัยด้านรหัสลับและคีย์ระวังภัย

We employ strict architecture-level restrictions in accordance with production-grade security standards to ensure no API Keys or configuration secrets leak on GitHub:

เราวางมาตรการการรักษารหัสผ่านและปกป้อง API Key อย่างรัดกุมที่สุด เพื่อป้องกันการโจรกรรมรหัสผ่านคีย์ของระบบขึ้นสู่สาธารณะ ด้วยหลักการดังนี้:

  1. Strict Server-side Proxy Pattern:
    • EN: All Gemini AI models, prompt commands, context logic, and Google TTS API keys are executed server-side under /server.ts or /api/*. Client-side code never has direct exposure to secret strings.
    • TH: รหัสและคีย์การควบคุม API ทั้งหมดจะถูกเก็บลึกไว้ในฝั่งเซิร์ฟเวอร์หลังบ้าน (/server.ts) หน้าบ้านจะติดต่อกันภายใต้ URL ภายในการโทร และส่งผ่านข้อมูลที่ไม่เป็นอันตรายเท่านั้น คีย์ความปลอดภัยจะไม่หลุดออกสู่แท็บเบราว์เซอร์อย่างเด็ดขาด
  2. Robust .gitignore Implementation:
    • EN: Prevents accidental tracking of configuration secrets. Ensures locally tested .env setups and .pem certificates are securely excluded from any git tree snapshots.
    • TH: ติดตั้งระบบบล็อกไฟล์ความลับผ่านไฟล์ .gitignore ระดับสูง เพื่อป้องกันไม่ให้พิมพ์หรือเซฟส่งไฟล์จำพวกคีย์ทดสอบ .env หรือกุญแจโครงสร้างความปลอดภัย .pem ไปยังบล็อกเก็บซอร์สโค้ด GitHub โดยไม่พึงประสงค์
  3. Lazy SDK Initialization Security:
    • EN: Server-side elements do simple checks and lazy-load variables only when required, preventing app startup crashes from missing env keys.
    • TH: ทุกบริการเรียกใช้งาน SDK ถูกเขียนจำกัดการเปิดรับแบบขี้เกียจ (Lazy Init) เพื่อให้เปิดทำงานเฉพาะเมื่อมีคำสั่งจากผู้ใช้จริงเท่านั้น ป้องกันไม่ให้แอปพลิเคชันพังในช่วงเริ่มทำงานหากระบบแครชจากการหาคีย์ไม่เจอ

Created with dedication to technical precision, organic audio fidelity, and the absolute logical truths of nature. / พัฒนาขึ้นด้วยสัจจะตรรกะแห่งความประณีต สมบูรณ์แบบด้วยจิตวิญญาณแอนะล็อกของเสียงสังเคราะห์

About

Creative Writing Story Ghostwriter is published!

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages