<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Suntti Kongviriyakit on Medium]]></title>
        <description><![CDATA[Stories by Suntti Kongviriyakit on Medium]]></description>
        <link>https://medium.com/@suntti.kon?source=rss-6596f13942ef------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*oVPaTNguww6X_CSR</url>
            <title>Stories by Suntti Kongviriyakit on Medium</title>
            <link>https://medium.com/@suntti.kon?source=rss-6596f13942ef------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 12:42:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@suntti.kon/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Decoding Thai Phonology for AI: Teaching Text-to-Speech Models Through the Lens of Traditional…]]></title>
            <link>https://medium.com/@suntti.kon/decoding-thai-phonology-for-ai-teaching-text-to-speech-models-through-the-lens-of-traditional-06385e6ef7bf?source=rss-6596f13942ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/06385e6ef7bf</guid>
            <category><![CDATA[thailand]]></category>
            <category><![CDATA[tts]]></category>
            <category><![CDATA[texting]]></category>
            <category><![CDATA[thai]]></category>
            <category><![CDATA[text-to-speech]]></category>
            <dc:creator><![CDATA[Suntti Kongviriyakit]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 06:55:06 GMT</pubDate>
            <atom:updated>2026-07-18T08:21:15.074Z</atom:updated>
            <content:encoded><![CDATA[<h3>Decoding Thai Phonology for AI: Teaching Text-to-Speech Models Through the Lens of Traditional Bases and Tone Classes 3</h3><p><strong>From Script to Pitch: Demystifying the Four Tone Markers and Their Mathematical Behavioral Shifts for TTS.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AHtQ3tVN1s7Do7UNqQKzew.png" /><figcaption>Table Examaple Thai TTS WannaYuke Read and Text Form</figcaption></figure><p><strong><em>Introduction: The Misconception of Four Markers</em></strong><br>In many Western languages, diacritics represent a shift in vowel quality or a simple stress marker. In Thai, however, the four tone markers — Mai Ek (่), Mai Tho_o (้), Mai Trii (๊), and Mai Cattawaa (๋) — are instructions for pitch modulation.</p><p>A common pitfall when training AI models on Thai text is assuming a direct, 1-to-1 mapping between a tone marker and the resulting acoustic tone. In reality, a tone marker does not possess a fixed sound; its phonetic output is entirely governed by the initial consonant class (High, Mid, Low) and the syllable structure (Live or Dead syllable). For a Text-to-Speech (TTS) engine to achieve natural-sounding inflection, it must learn the underlying algorithmic rules of these markers rather than mapping them superficially.</p><p><strong>The Four Markers and Their Behavioral Shifts</strong><br>To teach an AI model effectively, we must break down how these markers mathematically alter the pitch trajectory based on the traditional grammar rules.</p><p><strong><em>1. Mai Ek (่) : The Stabilizer of Lower Pitches</em></strong><br>Phonetic Behavior:</p><p>When applied to Mid and High-Class consonants, Mai Ek forces the pitch into a Low Tone (a flat, sustained lower frequency).</p><p>When applied to Low-Class consonants, it acts differently, shifting the pitch into a Falling Tone (starting high, then dropping rapidly).</p><p>TTS Blueprint: The model must identify the initial consonant class first. If the token is “ค่า” (Low Class + Mai Ek), the target pitch contour must be a steep descent, not a steady low pitch.</p><p><strong><em>2. Mai Tho_o (้) : The Dynamic Descender</em></strong></p><p>Phonetic Behavior:</p><p>For Mid and High-Class consonants, Mai Tho_o produces a Falling Tone.</p><p>For Low-Class consonants, it pushes the pitch into a sharp High Tone (or a high-rising/glottalized pitch in central Thai dialect).</p><p>TTS Blueprint: This is where acoustic models frequently stumble. The visual marker is identical, but “ข้า” (High Class) and “ค้า” (Low Class) require entirely distinct $F_0$ (Fundamental Frequency) curve shapes in the synthesis pipeline.</p><p><strong><em>3. Mai Trii (๊) &amp; Mai Cattawaa (๋) : The Mid-Class Exclusives</em></strong><br>Phonetic Behavior:</p><p>Mai Trii creates a distinct High Tone.</p><p>Mai Cattawaa creates a Rising Tone (starting low, then sweeping upward).</p><p>TTS Blueprint: In traditional phonology, these two markers are strictly reserved for Mid-Class consonants (and certain onomatopoeic loanwords). Because their usage is highly predictable and limited, the model can easily map them to consistent high and rising pitch contours, making them the most straightforward markers for an AI to learn.</p><p><strong>The Computational Formula for Tone Resolution</strong></p><p>For data pre-processing or creating a custom Grapheme-to-Phoneme (G2P) conversion script, the relationship can be visualized as a systematic function:</p><p><strong><em>Acoustic Tone = f(Consonant Class, Syllable Ending, Tone Marker)</em></strong></p><p>Without hardcoding this linguistic logic into the tokenization layer or feeding the model a deeply balanced phonetic dataset, the AI will struggle with homographs and tone shifting, resulting in a synthetic voice that sounds unnaturally robotic or flat to a native speaker’s ear.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06385e6ef7bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decoding Thai Phonology for AI: Teaching Text-to-Speech Models Through the Lens of Traditional…]]></title>
            <link>https://medium.com/@suntti.kon/decoding-thai-phonology-for-ai-teaching-text-to-speech-models-through-the-lens-of-traditional-7c1b43d20dbe?source=rss-6596f13942ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c1b43d20dbe</guid>
            <category><![CDATA[tts]]></category>
            <category><![CDATA[text-to-speech]]></category>
            <category><![CDATA[thai]]></category>
            <category><![CDATA[thailand]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Suntti Kongviriyakit]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 15:27:20 GMT</pubDate>
            <atom:updated>2026-07-03T15:27:20.959Z</atom:updated>
            <content:encoded><![CDATA[<h3>Decoding Thai Phonology for AI: Teaching Text-to-Speech Models Through the Lens of Traditional Bases and Tone Classes 2</h3><p><strong>Mapping Vowel Coordinates and Acoustic Anchors for Flawless Voice Synthesis.</strong></p><p>Ever wondered why Westerners or AI models often struggle with Thai vowels, turning ‘Karaoke’ into ‘Kara-o-kee’ or splitting words awkwardly? The secret lies in acoustic positioning and clipping the airflow.</p><p>Here is a definitive, no-nonsense guide mapping Thai vowels directly to English vocal anchors — designed specifically to ensure 100% pronunciation stability without any technical bugs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V2kJAUSr2juwEIJrEvg0vw.png" /><figcaption><strong>Sara in Thai Reading VS English spell and pronouncing</strong></figcaption></figure><p><strong><em>Part 1: Monophthongs (Pure Vowels — Short vs. Long Pairs)</em></strong><br>“Mastering the Short &amp; Long Pairs: How to hit the precise vowel length and when to use the ‘abrupt cutoff’ technique for short Thai vowels.”<br>สระเดี่ยว (Monophthongs) — เรียงคู่ สั้น-ยาว<br>อะ <br>a (as a Prefix / Open Syllable, e.g., “about”)<br>u (as a Short Vowel in a Closed Syllable, e.g., “but, cut, up, humm”)<br> — <br>อา ar (Sustained R-controlled vowel, e.g., “ar mar”)<br> — <br>อิ i (as a Short Vowel in a Closed Syllable, e.g., “pin, bin, sit”)<br> — <br>อี ee (as a Long Digraph Vowel, e.g., “see, meet, free”)<br> — <br>อึ ue (as a Short Central Vowel, e.g., “dueng” — ดึง)<br> — <br>อือ uerm (as a Sustained Flat-Lipped Vowel, e.g., “Luerm” — ลืม, ฮืม — hmm)<br> — <br>อุ u / oo (as a Short Near-Close Vowel, e.g., “look, book, push”)<br> — <br>อู oo / u (as a Sustained Rounded Vowel, e.g., “you, tool, cool”)<br> — <br>เอะ eh (Pronounced short and clipped, e.g., “Keh” — เกะ, “Teh” — เตะ, Karaokeheh)<br>Pronounced as the short “e” in “bet” or “met”, but cut off abruptly before the final consonant<br>The “e” sound in words like “Bet”, “Met”, or “End” (but without the final consonant)</p><p>— -<br>เอ A or Ay (Long Vowel, pronounced exactly like the letter “A”)<br>Example: ABAC (เอแบค) or Bay (เบ), Pay (เพย์)</p><p>— -<br>แอะ aeh or ah (Pronounced short and clipped, e.g., “Gaeh” — แกะ / “Gaeh-Glong” — แกะกล่อง)<br> — -<br>แอ a (Positioned between consonants, e.g., “Hang”)<br> — <br>โอะ / โอ๊ะ Oh! (Pronounced short and clipped, e.g., “Oh!” when surprised)<br>oh (with a sudden stop, e.g., “Poh” — โป๊ะ, “Toh” — โต๊ะ)<br>- Phonetic Behavior: Standard English lacks a pure standalone short /o/ (which usually shifts to /ɒ/ as in “pot”). To achieve “โอะ”, Westerners must produce a “Clipped Vowel” by abruptly cutting off the airflow right after starting the “Oh” sound.<br>- Acoustic Anchor: Think of the natural, sudden exclamation “Oh!” when someone is startled — that exact short, sudden burst is the precise coordinate for “โอ๊ะ”.</p><p>— <br>โอ o (as a Sustained Mid-Close Vowel, e.g., “Go, No, So”)<br> — <br>เอาะ o (as a Short Open Vowel, e.g., “pot” — พ็อต, “cop” — ค็อป)<br> — <br>ออ or (as a Sustained Mid-Open Vowel, e.g., “for, door, or”)<br> — <br>เออะ (oe)<br> — — <br>เออ ur (as a Sustained Mid-Central Vowel, e.g., “surf, burn, hurt”)</p><p><strong><em>Part 2: Diphthongs (Blended Vowels — Short vs. Long Pairs)</em></strong><br>“Gliding Sounds Made Easy: Navigating Thai blended vowels by anchoring them to natural English shifting sounds.”</p><p>สระประสม (Diphthongs) — เรียงคู่ สั้น-ยาว<br>เอียะ (ia)<br> — <br>เอีย eung (as a Diphthong Vowel, e.g., “deung” — เดียง)<br> — <br>เอือะ (uea), เอือ (ueaa), อัวะ (ua), อัว (uaa)</p><p><strong><em>Part 3: Special &amp; Archaic Vowels (Vowels with Hidden Final Consonants)</em></strong><br>“The Special Characters: From daily nasal sounds like ‘ใอ’ to rare archaic vowels found only in ancient historical texts.”<br>สระเกิน/สระที่มีเสียงพยัญชนะท้าย (Special Vowels)<br>อำ um (as a Short Nasal Vowel, e.g., “dum” — ดำ, “hum, sum”)<br> — <br>ไอ I (as an Open Diphthong Vowel, e.g., “I”, “idea” — when placed at the beginning of a word)<br> — <br>ใอ I / ai (as an Open Diphthong Vowel, e.g., “I”, “Mai” — ใหม่) <br>- Phonetic Behavior: Scientifically, “ใอ” shares the exact same acoustic coordinate as “ไอ”. The vocal tract opens wide and glides into a close-front position (starting from /a/ and ending at /i/), producing the perfect “AI” sound.<br>- Cultural Context: In traditional Thai grammar, this specific vowel is famously taught to children through a classic 20-word mnemonic poem called “Phu-Yai Ha Pha Mai…” (ผู้ใหญ่หาผ้าใหม่…).<br>- Implementation Logic: To prevent AI or Western speakers from mispronouncing or splitting syllables, anchoring this vowel to globally recognized references like I or the common name Mai ensures 100% stability without any technical bugs.<br> — <br>เอา ao (as a Closing Diphthong Vowel, e.g., “Kao” — เคา)<br> — <br>ฤ (รึ) (rue) Pronounced as a combined “R” and short “u/oo” sound, like “Roo”<br>Example: Rue-Doo (ฤดู — Season)<br> — -<br>Status: Archaic vowels. Used only in ancient Thai literature and historical documents; no longer used in modern everyday Thai.<br>ฤๅ (ruee)<br> — <br>ฦ (lue)<br> — -<br>ฦๅ (luee)</p><p>“Next Up: Decoding Thai Tones.”</p><p>“Now that we have nailed the vowel coordinates, the real magic of the Thai language happens here. Get ready for the next chapter, where we will crack the code of the 5 Thai Tones: Mid (สามัญ), Low (เอก), Falling (โท), High (ตรี), and Rising (จัตวา) — mapping them out simply so anyone, or any AI, can hit the perfect pitch every single time!”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c1b43d20dbe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decoding Thai Phonology for AI: Teaching Text-to-Speech Models Through the Lens of Traditional…]]></title>
            <link>https://medium.com/@suntti.kon/decoding-thai-phonology-for-ai-teaching-text-to-speech-models-through-the-lens-of-traditional-4761084dc57a?source=rss-6596f13942ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/4761084dc57a</guid>
            <category><![CDATA[speech-synthesis]]></category>
            <category><![CDATA[ai-training]]></category>
            <category><![CDATA[thai]]></category>
            <category><![CDATA[text-to-speech]]></category>
            <category><![CDATA[thailand]]></category>
            <dc:creator><![CDATA[Suntti Kongviriyakit]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 15:56:42 GMT</pubDate>
            <atom:updated>2026-06-30T15:57:38.145Z</atom:updated>
            <content:encoded><![CDATA[<h3>Decoding Thai Phonology for AI: Teaching Text-to-Speech Models Through the Lens of Traditional Bases and Tone Classes 1</h3><p><strong><em>The Blueprint of Thai Phonation: How Classifying Consonants by Articulation and Tri-Yang Upgrades AI Speech Synthesis</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*Zv5efDMW_FSYE3oihYtnOA.png" /><figcaption><strong>Thai Phonetics Bases VS TRI-YARNG (Tone of Characters)</strong></figcaption></figure><p><strong><em>Introduction: The Missing Link in Thai Speech Synthesis</em></strong><br>When we listen to modern AI-generated voices, the progress is undeniable. Text-to-Speech (TTS) models can now speak naturally, mimic human emotions, and even capture subtle breaths. Yet, when these advanced global models encounter the Thai language, they often stumble upon an invisible tonal wall. Thai is not just a language of words; it is a complex acoustic architecture where a single shifting tone transforms the entire meaning of a sentence.</p><p>Most contemporary AI training treats Thai text as flat sequences of data, relying purely on deep learning to brute-force the pronunciation. But to truly unlock flawless, natural Thai speech synthesis, we must look backward to leap forward. We need to bridge the cutting-edge world of neural networks with the ancient, time-tested engineering of traditional Thai phonology.</p><p>This article introduces the ultimate blueprint for Thai phonation — a structural synthesis that merges Traditional Phonetic Bases (ฐานกรณ์), which dictate where and how a sound is physically born in the human vocal tract, with Tri-Yarng (Sound Tone of Characters or ไตรยางค์), the historic tonal classification system. By teaching AI models to understand these foundational pillars, we move beyond simple text-to-speech conversion and begin engineering a system that truly comprehends the mechanics of the Thai voice. Here is how decoding ancient linguistics can radically upgrade modern AI speech technology.</p><p><strong>Decoding the Matrix: How the Table Works</strong><br>To the untrained eye, this table might look like a simple grid of Thai characters. However, for an AI engineer building a Text-to-Speech (TTS) model, this is an Acoustic Matrix — a two-dimensional instruction set that dictates both the physical waveform creation and the pitch modulation of the Thai voice.</p><p>Let’s break down the two core dimensions of this blueprint:</p><p><strong><em>1. The Vertical Axis: Phonetic Bases (ฐานกรณ์) — The Physical Waveform Generators</em></strong><br>Phonetic bases tell the AI model exactly where and how the sound resonance must be physically generated within the human vocal tract. For a neural network generating raw audio (like WaveNet or Vocoders), this translates to specific frequency characteristics:</p><p>1. Kanthaja (Throat / Glottal Base): Sounds like ก, ข, ค originate deep in the throat. There is no tongue constriction in the oral cavity, creating a deep, unobstructed baseline sound.</p><p>2. Taluja (Palatal Base): Characters like จ, ฉ, ช require the middle of the tongue to press against the hard palate. This creates a high-frequency friction or air-squeezing effect that AI must replicate.</p><p>3. Mutthaja (Alveolar / Retroflex Base): Sounds like ร, ล, ณ involve curling or touching the alveolar ridge. This is crucial for engineering natural “trills” or lateral airflow sounds — areas where AI voices often sound robotic.</p><p>4. Tantaja (Dental Base): For ด, ต, ท, ส, the tongue contacts the back of the front teeth, creating sharp, plosive, and sibilant boundaries.</p><p>5. Osthaja (Bilabial / Labial Base): Sounds like บ, ป, พ, ม are formed by sealing and bursting the lips. The AI must calculate a 100% air block before a sudden waveform release.</p><p>6. Mixed/Special Bases (e.g., Tantosthaja): The character ว is an advanced joint-articulation where the upper teeth touch the lower lip while forming a rounded shape. This requires a two-step vocal tract simulation.</p><p><strong><em>2. The Horizontal Axis: Tri-Yarng (Tone Classes) — The Pitch Multiplier Rules</em></strong></p><p>While the Phonetic Bases determine the shape of the sound wave, Tri-Yarng acts as the Tone Mapping Rules. It functions like a mathematical multiplier that determines the Fundamental Frequency ($F_0$) Contour of a syllable when combined with vowels and final consonants:</p><p>Middle Consonants (อักษรกลาง): Operating as the stable Baseline (0), this group can organically morph into all 5 tones matching their exact written tone marks. It is the easiest class for deep learning models to predict.</p><p>High Consonants (อักษรสูง): Possessing an inherent rising tone as their default state, these characters are accompanied by heavy air aspiration. The AI must initiate the sound wave at a higher pitch frequency.</p><p>Low Consonants (อักษรต่ำ): This is the ultimate trap for modern TTS engines. This class features “Hidden Shifting Rules” — for instance, a first tone mark (Mai-Ek) actually forces a falling tone, and a second tone mark (Mai-Tho) shifts into a high tone. Without understanding this rule, a global AI model will consistently mispronounce Thai words.</p><p><strong>The Developer’s Takeaway</strong><br>By feeding this Matrix into a Thai TTS Text-Parser, the AI no longer sees the character พ (Phor Pharn) as a flat piece of text. Instead, the system instantly processes a dual command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*5vJNm_yImcj-6BaoIg-TQg.png" /><figcaption>Characters Tone VS Tri-Yarng</figcaption></figure><p>This dual-layered understanding drastically upgrades the accuracy of the synthesized voice, eliminating awkward accents and making AI speech indistinguishable from a native speaker.</p><p><strong>Transition: The Dynamic Engine of Thai Vowels (สระ)</strong><br>While consonants act as the physical structural pillars and tone initiators of the Thai language, they remain static without the engine that drives them forward: Vowels (สระ — Sra).</p><p>In Thai phonology, vowels are not just simple letters placed next to a consonant; they are highly dynamic, multi-dimensional audio modulators. From a digital speech synthesis standpoint, if consonants define the initial acoustic boundary, vowels dictate the duration, formant frequencies, and sustained pitch trajectory of the synthesized voice.</p><p>To train an AI model to articulate Thai vowels naturally, developers must understand that Thai vowels operate on two critical engineering principles: Acoustic Length (Short vs. Long Vowels) and Spatial Positioning (Non-Linear Text Topology). Let’s decode how these vowel mechanics work inside the AI Text-Parser.</p><p><strong>Stay Tuned for Part 2: Engineering the Thai Vowel</strong></p><p>Engine Understanding the relationship between consonants and phonetic bases is only half the battle. To stop AI models from mispronouncing vowels — like stumbling over the notorious “อึ / อือ” (ɯ) or mistaking a sustained “อา” for a flat sound — we must completely overhaul how text parsers map these sounds to global acoustic engines.In the next part of this series, we will dive deep into the actual data preparation for Thai vowels. We will explore how replacing legacy Romanization with an AI-friendly, acoustic-driven mapping (such as shifting from the confusing aa to a more natural ar, and mastering the ue / uee framework) can completely eliminate foreign accents in synthetic speech.We will also decode the “Spatial Positioning Problem” — how to teach a linear AI model to read Thai vowels that are written above, below, before, or even wrapped around a consonant.Don’t miss the next chapter of the blueprint. Follow along to unlock the code behind flawless, natural Thai speech synthesis.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4761084dc57a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Invisible Barrier: Why Broken PDF Text Layers are Killing Thailand’s Digital Reading Culture]]></title>
            <link>https://medium.com/@suntti.kon/the-invisible-barrier-why-broken-pdf-text-layers-are-killing-thailands-digital-reading-culture-8490156d1058?source=rss-6596f13942ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/8490156d1058</guid>
            <category><![CDATA[pdf]]></category>
            <category><![CDATA[open-research-problems]]></category>
            <category><![CDATA[pdf-converter]]></category>
            <category><![CDATA[ebook-pdf]]></category>
            <dc:creator><![CDATA[Suntti Kongviriyakit]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 14:27:02 GMT</pubDate>
            <atom:updated>2026-06-30T14:27:02.346Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Ctrl + F and the Ghost Spaces: A Plea for Better Thai PDF Engine Rendering</em></strong></p><p>It has long been a common, yet frustrating, stereotype that Thai people read very few books a year. But as we transition into a fully digital era where historical archives, religious texts, and academic papers are hosted online, a deeper, systemic issue comes to light. The problem isn’t always a lack of desire to learn; often, it is the technology itself that blocks access.</p><p>Anyone who has ever conducted research using Thai language PDFs knows the silent agony of pressing Ctrl + F, typing a keyword clearly visible on the screen, only to be met with: ‘No matches found.’<br>Behind the beautiful typography displayed on our screens lies a broken, chaotic ‘Text Layer’ — a digital mess of misplaced vowels and invisible, ghostly word spaces that render search engines blind. When technology fails to provide seamless searchability, users experience friction, frustration, and ultimately, disengagement. They simply close the file. In a sense, poorly optimized PDF engines are inadvertently destroying Thailand’s digital reading and research culture.</p><p>Drawing from the technical insights of our previous discussion on how text layers behave under the hood when exported from applications like LibreOffice and read via specialized engines like SumatraPDF, this article is a plea. It is a respectful call to action for global PDF converter developers and software engine creators to recognize the unique complexities of the Thai language, and to help us restore total freedom to the world of digital reading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*EoWetZaZM534umZleVzYEA.png" /><figcaption><strong>Thai PDF Text Layer Corruption: A major technical barrier for digital researchers.</strong></figcaption></figure><p>The image clearly demonstrates the hidden chaos inside Thai digital documents. On the left, the PDF appears perfectly formatted and readable to the human eye. However, when the text is copied and pasted into a plain text editor like Notepad (on the right), the underlying Text Layer is completely corrupted.<br>Due to faults in the PDF Reader Engine, vowels are misplaced, words are shattered, and invisible ‘ghost spaces’ are injected into the text. Consequently, researchers are forced into a tedious and time-consuming process of manually editing and reconstructing this chaotic text before it can even be used.</p><p><strong>An Appeal to Global PDF Converter and Reader Engine Developers</strong></p><p>In an era powered by AI, Big Data, and total digital transformation, a PDF document can no longer exist simply to look pretty on a screen. The underlying Text Layer has become a critical piece of infrastructure — the very foundation that feeds human research, knowledge indexing, and machine learning.</p><p>Therefore, we respectfully appeal to global developers of PDF converters and rendering engines. We urge you to look closer at the unique structural complexities of the Thai language. By optimizing your algorithms to correctly sequence Thai characters and accurately process non-spaced text, you can eliminate the hidden chaos of corrupted layers and ghost spaces.</p><p>This is not just a software patch; it is an investment in human knowledge. Resolving this issue will tear down an invisible barrier, building a robust digital foundation that restores true freedom of reading and research to millions in the digital age.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8490156d1058" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Thai Text Layers Break in PDFs: The Broken Pipeline of Conversion and Rendering]]></title>
            <link>https://medium.com/@suntti.kon/why-thai-text-layers-break-in-pdfs-the-broken-pipeline-of-conversion-and-rendering-d34c93900d0b?source=rss-6596f13942ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/d34c93900d0b</guid>
            <category><![CDATA[pdf-converter]]></category>
            <category><![CDATA[ebook-pdf]]></category>
            <category><![CDATA[pdf]]></category>
            <category><![CDATA[typography]]></category>
            <category><![CDATA[data-extraction]]></category>
            <dc:creator><![CDATA[Suntti Kongviriyakit]]></dc:creator>
            <pubDate>Mon, 29 Jun 2026 13:33:59 GMT</pubDate>
            <atom:updated>2026-06-29T13:33:59.904Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Exploring the structural flaws of Thai fonts and text layer engines when converting docs to PDF and extracting data.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Cl1o4V8ObDvSP2hdkqcbw.png" /><figcaption>THAI Text Layer Summary Procedure (Only Photo by AI)</figcaption></figure><p><strong>Part 1: The Root of the Document — TrueType Fonts (TTF) and Open Formats</strong><br>The integrity of a Thai PDF text layer begins long before the “Export to PDF” button is ever clicked. It starts at the very origin of the data pipeline: document authoring.</p><p>To understand why Thai script breaks so easily, we must look at how characters are handled at the root. For this workflow, the process initiates with two critical decisions:</p><p>1. The Choice of Font Engine: TrueType Fonts (.TTF)<br>Unlike Western scripts where characters sit sequentially on a single baseline, Thai is a multi-level script. Vowels and tone marks can sit above or below the consonant (e.g., สระ, วรรณยุกต์).</p><p>Using standard TrueType Fonts (TTF) ensures that each glyph, combined character, and positioning coordinate is fully mapped within the font’s internal tables. When formatting Thai text, relying on system-native TTF structures provides a clean digital anchor for each character component, ensuring that the software recognizes the script’s absolute layout rather than just treating it as a visually combined graphic block.</p><p>2. Document Authoring with LibreOffice and the .DOCX Standard<br>Instead of using restrictive proprietary software, the initial document drafting and editing are performed using LibreOffice, a powerful open-source office suite.</p><p>The Editing Process: LibreOffice provides robust compliance with complex script types, making it highly reliable for managing the intricate spacing requirements of Thai formatting without introducing hidden formatting metadata that could corrupt the layout.</p><p>The File Structure: Once the text and layout are finalized, the document is saved in the .docx format. This XML-based architecture preserves the explicit structural hierarchy, formatting flags, and font mappings of the Thai text blocks, setting up a completely predictable framework before the conversion engine takes over.</p><p>However, saving a perfectly structured .docx file with the correct .ttf fonts in an offline editor is only half the battle. The real challenge — and where most automated systems break down — lies in how this structural pipeline transitions from an editable format into a static PDF text layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*22kzAi1m0ciYw05Q3Q4KJA.png" /><figcaption>Example ttf Thai font</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*-D98ci5r3ZW9LYlOXebBBw.png" /><figcaption>Thai Document docx convert to PDF with LibreOffice</figcaption></figure><p><strong>Part 2: The Silent Culprit — How PDF Readers Break the Thai Text Layer</strong><br>Even if a document is perfectly authored with compliant TrueType fonts and converted via a clean engine, the battle for a flawless Thai PDF is only halfway won. The final, and often overlooked, link in this digital pipeline is the PDF Reader Engine itself.</p><p>For Western languages, rendering a text layer is a straightforward, sequential operation. But for complex, multi-level scripts like Thai — where vowels and tone marks stack above and below consonants — the PDF Reader must do more than just display shapes; it must reconstruct the correct text stream behind the scenes.</p><p><strong><em>The Impact on Search and AI Text-to-Speech (TTS)</em></strong><br>When a PDF Reader fails to interpret the positional metadata of Thai characters properly, the underlying Text Layer becomes deeply corrupted. This breakdown triggers two major technical failures:</p><p>Broken Searchability: If the reader engine fails to map the stacked vowels and consonants in their true linguistic sequence, the “Ctrl + F” search function fails entirely. Words are treated as broken fragments rather than continuous strings.</p><p>AI Text-to-Speech (TTS) Distortion: Modern AI narration and TTS engines rely heavily on the browser or reader’s text extraction layer to read documents aloud. If the reader extracts a corrupted text layer where tone marks are misplaced or character spaces vanish, the AI engine will mispronounce words, completely ruining the natural speech flow.</p><p><strong><em>The Discovery: Why SumatraPDF is the Solution</em></strong><br>Through rigorous testing of various PDF readers and browser-integrated PDF viewers — which often suffer from severe rendering and extraction bugs when handling Thai script — I discovered a powerful exception: SumatraPDF.</p><p>SumatraPDF stands out because of its lightweight yet highly accurate text rendering architecture. When opening a Thai PDF in SumatraPDF, the software executes a precise character-mapping process:</p><p>Perfect Font Mapping: It flawlessly handles the embedded .ttf tables, ensuring that the visual layout matches the semantic data layer perfectly.</p><p>Clean Text Extraction: Unlike heavy, bloated readers that distort word spaces or misplace floating vowels upon extraction, copying text from SumatraPDF into a plain text editor reveals a 100% accurate, uncorrupted layout.</p><p>By utilizing SumatraPDF as the primary reader, we ensure that the Thai text layer remains completely intact, perfectly searchable, and fully optimized for AI narration tools without any distortion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/81/1*EGowmzim89Lird8YcBfTvQ.png" /><figcaption>SumatraPDF Shortcut icon</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fpDZr4D8rdvtpUe6CwrnQA.png" /><figcaption>Example Copy Thai text search from SumatraPDF to NotePad</figcaption></figure><p><strong>Part 3: The Unicode Illusion — Why Web Browsers and AI TTS Engines Fail</strong><br>When a PDF is viewed through a standard Web Browser (such as Chrome, Edge, or Safari), the integrated PDF viewer processes the document using standard web technologies. These browsers read the underlying data stream primarily via Unicode (UTF-8 or UTF-16) character encodings. While Unicode is the global standard for text interchange, its implementation within browser-based PDF rendering engines introduces a catastrophic breakdown when handling Thai script.</p><p><strong><em>1. The Logical vs. Visual Processing Trap</em></strong><br>In a standard text file or web page, Thai Unicode characters are typed sequentially (Consonant + Vowel + Tone). The operating system’s rendering engine automatically handles the visual stacking.</p><p>However, a PDF file operates on a Coordinate-Based Postscript System. It tells the reader exactly where to draw a glyph on a 2D plane. When a browser’s layout engine attempts to extract text from a PDF, it tries to map these absolute visual coordinates back into a logical Unicode stream. Because Thai vowels and tone marks sit on different vertical levels (above or below the baseline), the browser gets confused. It fails to reassemble the characters in their correct linguistic sequence, causing tone marks to detach, slide to the next character, or drop onto their own broken lines, as clearly demonstrated when pasted into a plain text editor.</p><p><strong><em>2. The Impact on Browser-Based Search (Ctrl + F)</em></strong><br>Because the browser’s internal text layer thinks the word “เอกสารชั้นต้น” is structurally written as a fragmented sequence of separated consonants and floating marks, the built-in search indexing fails completely. If you search for the correctly spelled word, the browser’s search engine cannot find a match because the text layer it “sees” is a garbled string of broken characters.</p><p><strong><em>3. Why AI Text-to-Speech (TTS) Programs Synthesize Corrupted Audio</em></strong><br>This dual-failure of conversion and browser rendering is exactly why modern application-based Text-to-Speech (TTS) tools read Thai PDFs with heavy distortion.</p><p>Most AI voice synthesis tools and screen readers do not look at the visual rendering on the screen; they inject a script to scrape the raw text layer directly from the browser’s PDF engine. When the script extracts a corrupted Unicode text stream where spaces vanish and characters are scrambled, the AI reads the text literally as it is extracted. The result is a broken, robotic, and completely unnatural narration that completely ruins the user experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kMzjJtRww_zq_fPOyrYS8w.png" /><figcaption>Web Browser read Thai fail Because Thai Text Layer use unicode Thai Font</figcaption></figure><p><strong>Part 4: The Ultimate Local Pipeline — Preserving Thai Bookmarks and Structural Integrity</strong><br>To build a professional digital archive or technical document, preserving the text layer is only one side of the coin. The other critical requirement is maintaining the document’s structural navigation, such as Bookmarks and Headers (Table of Contents).</p><p>When relying on cloud engines or mainstream browsers to handle Thai documents, creators are often forced to choose between a functional navigation tree or a searchable text layer. By shifting to a completely local pipeline, we can secure both.</p><p><strong><em>1. Advanced Source Authoring with LibreOffice (The Power of Native Bookmarks)</em></strong><br>The foundation of a reliable Thai PDF relies on generating a permanent, pre-compiled structure locally.</p><p>Structuring with Intent: During the drafting stage in LibreOffice, using standard TrueType Fonts like Noto Sans Thai, the document is organized with proper heading styles (H1, H2, H3).</p><p>The Embedded Architecture: When saving as a .docx file or exporting directly via LibreOffice, the software injects explicit Bookmark metadata into the file. This process binds the Thai heading text directly to the document’s navigation tables, preventing the text drift or font substitution that typically destroys Thai character mapping when processed by cloud-based conversion platforms.</p><p><strong><em>2. Seamless Navigation and Flawless Extraction in SumatraPDF</em></strong><br>The real magic happens when this properly authored document meets SumatraPDF. While Chromium-based browsers (Chrome/Edge) strip away or glitch out when processing complex Thai index structures, SumatraPDF processes the local file perfectly:</p><p>Intact Navigation Tree: Upon opening the document, the Bookmark panel renders flawlessly. Users can click through the Thai headers to navigate deep into the document without encountering corrupted symbols or broken character rendering.</p><p>100% Searchable and Extractable: As proven by real-world testing, typing a specific phrase like “เอกสารชั้นต้น” into SumatraPDF’s search engine immediately hits the target. Copying that exact text block out of the reader and dumping it into Notepad preserves every single character, floating vowel, and tone mark in its exact linguistic order.</p><p><strong>Conclusion</strong><br>Achieving a bulletproof, professionally navigable Thai PDF does not require cloud-based AI processing or heavy proprietary ecosystems. It requires technical discipline at the source. By structure-mapping documents locally with LibreOffice’s native bookmarks and deploying SumatraPDF as the final verification gate, engineers and archivists can produce pristine Thai digital documents that are structured for navigation, fully searchable, and completely ready for perfect AI Text-to-Speech integration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*MK9LlyB0RGl_f7GIUlvH2Q.png" /><figcaption>Bookmarks Still in PDF after Convert by LibreOffice</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d34c93900d0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding NSMA Antenna Pattern File Format for Microwave Path Calculations]]></title>
            <link>https://medium.com/@suntti.kon/understanding-nsma-antenna-pattern-file-format-for-microwave-path-calculations-9f3853558d38?source=rss-6596f13942ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f3853558d38</guid>
            <category><![CDATA[antenna]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[microwave-antenna-data]]></category>
            <category><![CDATA[microwave]]></category>
            <category><![CDATA[telecommunication]]></category>
            <dc:creator><![CDATA[Suntti Kongviriyakit]]></dc:creator>
            <pubDate>Mon, 29 Jun 2026 10:31:35 GMT</pubDate>
            <atom:updated>2026-06-29T11:01:18.680Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>A practical guide to .DAT file structures, key parameters, and data examples for transmission engineers.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VTwPuNBIhL_Upvg9o0o_dw.png" /><figcaption><strong>NSMA Antenna Pattern (Only Photo by AI)</strong></figcaption></figure><p><strong>Understanding NSMA Antenna Pattern File Format for Microwave Path Calculations</strong></p><p>NSMA Radio microwave antenna pattern is standard used radio microwave path calculations, which microwave antenna factory, and or transmission engineer should have for path calculations.</p><p>NSMA Pattern files is in *.DAT file family able to edit with any editor or spread sheet or NSMA C Lite</p><p>Important data should edit should have detail as following</p><p>REVNUM Revision Number 42<br>REVDAT Revision Date 16<br>COMNT1 Comment1 80<br>COMNT2 Comment2 80<br>ANTMAN Antenna Manufacturer 42<br>MODNUM Model Number 42<br>PATNUM Pattern ID Number 42<br>FILNUM Pattern File Number 13<br>FEDORN Feed Orientation 13<br>DESCR1 Description1 80<br>DESCR2 Description2 80<br>DESCR3 Description3 80<br>DESCR4 Description4 80<br>DESCR5 Description5 80<br>DTDATA Date of data 16<br>LOWFRQ Low Frequency (MHz) 21<br>HGHFRQ High Frequency (MHz) 21<br>GUNITS Gain Units 15<br>LWGAIN Low-band gain 12<br>MDGAIN Mid-band gain 16<br>HGGAIN High-band gain 12<br>AZWIDT Mid-band Az Bmwdth 16<br>ELWIDT Mid-band El Bmwdth 16<br>CONTYP Connector Type 80<br>ATVSWR VSWR 13<br>FRTOBA Front-to-back Ratio(dB) 10<br>ELTILT Electrical Downtilt (deg) 16<br>RADCTR Radiation Center (m) 13<br>POTOPO Port-to-Port Iso (dB) 12<br>MAXPOW Max Input Power (W) 17<br>ANTLEN Antenna Length (m) 14<br>ANTWID Antenna Width (m) 14<br>ANTDEP Antenna Depth (m) 14<br>ANTWGT Antenna Weight (kg) 16<br>FIELD1 Future Field 80<br>FIELD2 Future Field 80<br>FIELD3 Future Field 80<br>FIELD4 Future Field 80<br>FIELD5 Future Field 80<br>PATTYP Pattern Type 16<br>NOFREQ # Freq this file 10<br>PATFRE Pattern Freq (Mhz) 21<br>NUMCUT # Pattern cuts 11<br>PATCUT Pattern Cut 11<br>POLARI Polarization 15<br>NUPOIN # Data Points 13<br>FSTLST First &amp; Last Angle 25<br>XORIEN X-axis Orientation 53<br>YORIEN Y-axis Orientation 53<br>ZORIEN Z-axis Orientation 53</p><p>ENDFIL End of file 11</p><p>Example NSMA data get from NSMA C Lite as below</p><p>REVNUM:,NSMA WG16.99.050<br>REVDAT:,19990520<br>ANTMAN:,AppsBusinessHardware<br>MODNUM:,AAA12–71WS<br>PATNUM:,AAA12–71WS_DP<br>DESCR1:,Dual Polarization<br>DESCR2:,Fine Azimuth Adjustment +/-15<br>DESCR3:,Fine Elevation Adjustment +/-14<br>DESCR4:,Operation wind speed 250km/h<br>DESCR5:,ETSI Class 2<br>DTDATA:,20180628<br>LOWFRQ:,7125<br>HGHFRQ:,8500<br>GUNITS:,DBI/DBR<br>LWGAIN:,36.2<br>MDGAIN:,37.0<br>HGGAIN:,37.8<br>AZWIDT:,2.2<br>ELWIDT:,2.2<br>CONTYP:,UDR84<br>ATVSWR:,1.30<br>FRTOBA:,58<br>ELTILT:,0<br>POTOPO:,35<br>ANTLEN:,1.2<br>ANTWID:,1.2<br>ANTWGT:,37<br>FIELD1:,XPD 30<br>PATTYP:,ENVELOPE<br>NUMCUT:,4<br>PATCUT:,AZ<br>POLARI:,H/H<br>NUPOIN:,21<br>-180,-63<br>-100,-63<br>-70,-45<br>-30,-34<br>-15,-30<br>-5,-20<br>-4.375,-14<br>-2.5,-14<br>-1.25,-4<br>-0.625,0<br>0,0<br>0.625,0<br>1.25,-4<br>2.5,-14<br>4.375,-14<br>5,-20<br>15,-30<br>30,-34<br>70,-45<br>100,-63<br>180,-63<br>PATCUT:,AZ<br>POLARI:,H/V<br>NUPOIN:,15<br>-180,-63<br>-95,-63<br>-40,-45<br>-12.5,-44<br>-10,-40<br>-3.75,-35<br>-1.25,-30<br>0,-30<br>1.25,-30<br>3.75,-35<br>10,-40<br>12.5,-44<br>40,-45<br>95,-63<br>180,-63<br>PATCUT:,AZ<br>POLARI:,V/V<br>NUPOIN:,21<br>-180,-63<br>-100,-63<br>-70,-44<br>-40,-35<br>-10,-26<br>-5,-20<br>-3.75,-12<br>-2.5,-12<br>-1.25,-4<br>-0.625,0<br>0,0<br>0.625,0<br>1.25,-4<br>2.5,-12<br>3.75,-12<br>5,-20<br>10,-26<br>40,-35<br>70,-44<br>100,-63<br>180,-63<br>PATCUT:,AZ<br>POLARI:,V/H<br>NUPOIN:,15<br>-180,-63<br>-95,-63<br>-40,-45<br>-12.5,-43<br>-7.5,-36<br>-2.5,-34<br>-1.25,-30<br>0,-30<br>1.25,-30<br>2.5,-34<br>7.5,-36<br>12.5,-43<br>40,-45<br>95,-63<br>180,-63<br>ENDFIL:,EOF</p><p>Hopefully this information would help transmission engineer and/or Radio Microwave antenna factory able to build NSMA data pattern for Path Calculation software.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f3853558d38" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>