Knowledge Hubบทที่ 36
School Tracks · ห้องเรียน

ถอดเสียงไทย · Thai Voice Transcription

หลักการคือ "ต้องมีเฉลยถูกก่อน แล้วค่อย train" — สะสม ground truth เสียงตัวเองก่อนจะ fine-tune โมเดล · The principle is 'you need correct answers first, then train' — accumulate your own ground truth audio before fine-tuning any model.

หลักการ Ground Truth First

หลักคิดหลักคือ ต้องมีเฉลยที่ถูกต้องก่อนจะ train โมเดลได้ วิธีสะสมคือบันทึกเสียงตัวเองจากการสอน ~10–20 ชั่วโมง แล้วใช้ Google Doc voice-to-text (ฟรี) เป็นเฉลยอ้างอิงเบื้องต้น

The core principle: you need correct transcriptions before you can train. Accumulate ground truth by recording your own teaching voice ~10–20 hours, using Google Doc voice-to-text (free) as a baseline reference answer.

Pipeline: WhisperFlow → เปรียบเทียบ → Distill → MLX

ใช้ WhisperFlow รับเสียงและเก็บ history จากนั้นเทียบ base model: Whisper, Typhoon, Groq เพื่อเลือกตัวที่ดีที่สุดกับภาษาไทย แล้ว distill ให้เล็ก/เร็วพอรันบน local ด้วย MLX (Apple Silicon) ได้ ~0.26 วินาทีต่อชิ้น

Use WhisperFlow for audio capture and history. Compare base models — Whisper, Typhoon, Groq — to find the best fit for Thai. Then distill to a smaller/faster model that runs locally on MLX (Apple Silicon) at ~0.26s per chunk.

ทำไมไม่ใช้ Discord Bot

การรัน local ดีกว่า Discord bot เพราะไม่มี rate limit และเป็น bidirectional (เสียง↔text, ต่อ TTS กลับได้) ไม่ต้องพึ่ง third-party service

Running locally beats a Discord bot: no rate limits, bidirectional (voice↔text, can chain TTS back), and no third-party service dependency.

ปัญหาภาษาไทย: การตัดคำ

ปัญหาหลักของ Thai transcription คือ tokenization — ถ้าตัดคำผิด วัด accuracy ไม่ได้เลย ต้องแก้ที่ตัว tokenizer ก่อนจะวัดคุณภาพโมเดลได้

The core Thai problem is tokenization. If word segmentation is wrong, accuracy measurement becomes meaningless. Fix the tokenizer before measuring model quality.

Demo: อ่านหนังสือสด

สาธิตในห้องเรียนด้วยการอ่านหนังสือแนวสมาธิสด ๆ เพื่อสร้าง labeled data — เห็นกระบวนการจากเสียง → text → ground truth → training data ได้ทั้งหมดในรอบเดียว

Live demo in class: reading a meditation book aloud to create labeled data — showing the full pipeline from voice → text → ground truth → training data in a single pass.