BlogSpeech-to-Text

How a Thai transcript writes numbers, spoken or written

Thai says every number in words. A transcript can keep the words or turn them into digits, and each reader needs a different one. Which convention to ask for, and when.

· 4 min read

Thai speech carries numbers as words. A price is said as สองพันสามร้อยห้าสิบบาท, a date as สิบห้ามกราคม, and a time as เก้าโมงครึ่ง. A person writing the same line on a page turns each into digits without thinking about it. A transcription model has to be told which of the two it is writing, because both are correct and each serves a different reader.

Paxa STT Lite calls the two forms conventions. The spoken convention writes what was said. The written convention writes what a page would show. This post shows the difference on five lines, then says which readers need which, and how to ask for each one.

The same five lines, twice#

SpokenWritten
ยอดรวม สองพันสามร้อยห้าสิบบาทยอดรวม 2,350 บาท
นัดวันที่ สิบห้า มกราคมนัดวันที่ 15 มกราคม
ลดราคา ยี่สิบเปอร์เซ็นต์ลดราคา 20%
ประชุมเวลา เก้าโมงครึ่งประชุมเวลา 9:30
เด็ก ๆ ไปกันหมดแล้วเด็ก ๆ ไปกันหมดแล้ว

The first four rows change. Amounts become grouped digits with the unit kept as a word. A date keeps the month as a word and the day as a digit. A percentage becomes the sign. A clock time becomes hours and minutes with a colon. The fifth row is the same in both, and the reason is worth a paragraph.

Thai repeats a word to mark plurality or emphasis, and the page writes the repetition with one mark, ๆ. Speech has no mark. It says the word twice. The written convention keeps the mark where a page would print it. The spoken convention keeps the word as said, and here the two forms happen to agree.

Who needs which#

A subtitle needs the spoken form. The viewer hears the words and reads the words, and a digit on screen while the speaker says four syllables reads as a mismatch. A verbatim record for a newsroom or a court needs the spoken form for the same reason. The transcript is evidence of what was said.

A language model reading the transcript usually wants the spoken form too. The model reads Thai number words as fluently as digits, and the spoken form keeps the sentence as one Thai sentence. A prompt that asks the model to extract the amount gets the same answer either way.

A record that will be searched, filed, or matched by a rule needs the written form. A collections rule matches on 3,500. A meeting note that lists a deadline wants 15 มกราคม. A dictated letter wants to read as a letter. Anything that ends up in a table or a form wants digits.

The two forms come from the same recording and the same request. Ask for both when the transcript has two readers. A call transcript can be filed under the written form and shown to a QA reviewer under the spoken one.

Asking for each one#

The spoken convention is the default. Send convention as "written" for the other. Word timestamps are the same under both, because the timing belongs to the audio and the convention belongs to the text.

curl
AUDIO=$(base64 < meeting.m4a | tr -d '\n')
curl -X POST https://api.paxalabs.com/v1/stt \
  --max-time 300 \
  -H "Authorization: Bearer $PAXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"audio\": \"$AUDIO\", \"model\": \"paxa-stt-lite-v1-preview\", \"convention\": \"written\"}"
Response
{
  "text": "สวัสดีค่ะคุณสมชายยอดชำระของท่านจำนวน 1,250 บาทครบกำหนดวันที่ 15 สิงหาคมนี้ชำระผ่านแอปได้ตลอด 24 ชั่วโมงค่ะ",
  "usage": {
    "seconds": 10.25,
    "credits": 1.43
  }
}

One more detail matters for a written transcript. A figure that reaches digits is read from the words the model heard, and Thai says large numbers in a fixed order of thousands, hundreds, tens, and units. A number said in an unusual order stays as words. Check the written form against the audio at the second the figure was said, which word timestamps give you for nothing.

Next steps#

  • Read the transcription guide for the two conventions beside the model's own reading of one recording.
  • Read the reference for the convention field and the response shape.
  • Read the subtitles post for building cues from word timestamps under the spoken convention.
  • Open the transcribe tool and run one recording under both conventions. The two transcripts sit side by side with the differing words marked.