vietnamese-phonetic-transcript
v1.0.0
Published
A library for converting Vietnamese text to its phonetic transcription.
Readme
:notebook_with_decorative_cover: Table of Contents
:toolbox: Getting Started
:bangbang: Prerequisites
This project uses pnpm as package manager:
npm install --global pnpm
:running: Run Locally
Clone the project:
git clone https://github.com/DuckyMomo20012/vietnamese-phonetic-transcript.gitGo to the project directory:
cd vietnamese-phonetic-transcriptInstall dependencies:
pnpm install:eyes: Usage
Bảng phiên âm âm vị học Tiếng Việt
Hệ thống âm đầu
Hệ thống âm đầu: 22 phụ âm
| STT | Âm vị | Chữ viết (+ bối cảnh sử dụng) | Ví dụ | | --- | ---------------- | --------------------------------------------- | ------------------- | | 1 | /b-/ | b | bè bạn | | 2 | /m-/ | m | mệt mỏi | | 3 | /f-/ | ph | phờ phạc | | 4 | /v-/ | v | vờ vĩnh | | 5 | /t-/ | t | tí tẹo | | 6 | /tʼ-/ | th | tha thướt | | 7 | /d-/ | đ | đủng đỉnh | | 8 | /n-/ | n | no nê | | 9 | /z-/ | d/gi | giầy da, bánh dầy | | 10 | /ʐ-/ | r | rườm rà | | 11 | /s-/ | x | xa xôi | | 12 | /ʂ-/ | s | san sẻ | | 13 | /c-/ | ch | chim chóc | | 14 | /ʈ-/ | tr | trang trại | | 15 | /ɲ-/ | nh | nhí nhảnh | | 16 | /l-/ | l | lươn lẹo | | 17 | /k-/ | k (+ âm chính: /-i-/, /-e-/, /-ɛ-/, /-ie-/) | kim, kê, kẻ, kiếm | | 17 | /k-/ | q (+ âm đệm: /-u-/) | quả, quýt, quê | | 17 | /k-/ | c (còn lại) | con, cà, cuống | | 18 | /χ-/ | kh | khắt khe | | 19 | /ŋ-/ | ngh (+ âm chính: /-i-/, /-e-/, /-ɛ-/, /-ie-/) | nghĩ, nghèo, nghiền | | 19 | /ŋ-/ | ng (còn lại) | ngố, ngáo, ngõ | | 20 | /ɣ-/ | gh (+ âm chính: /-i-/, /-e-/, /-ɛ-/, /-ie-/) | ghi, ghẻ, ghê | | 20 | /ɣ-/ | g (còn lại) | gà, gỗ, gụ | | 21 | /h-/ | h | hát hò | | 22 | /ʔ-/ hoặc /zero/ | không thể hiện | ăn, uống, uể, oải |
Hệ thống âm đệm
Hệ thống âm đệm: 2 bán nguyên âm
| STT | Âm vị | Chữ viết (+ bối cảnh sử dụng) | Ví dụ | | --- | ----------------- | --------------------------------------------------- | --------------------------------------- | | 1 | /-w-/ hoặc /-u-/ | u (+ âm đầu: /k-/ (ghi bằng con chữ "q")) | quê, quả, quán, quyên, quăn, quận, quốc | | 1 | /-w-/ hoặc /-u-/ | u (+ âm chính: /-i-/, /-e-/, /-ɤ-/, /-ɤ-/, /-ie-/) | huy, huế, huơ, huân, huyền | | 1 | /-w-/ hoặc /-u-/ | o (các trường hợp còn lại) | hoa, hoe, hoác, họa hoằn | | 2 | /zero/ | không thể hiện | hể hả, hiền, hương |
[!NOTE] Toàn bộ tài liệu sẽ sử dụng /-u-/ để biểu diễn âm đệm này.
Hệ thống âm chính
Hệ thống âm chính: 13 nguyên âm đơn, 3 nguyên âm đôi
| STT | Âm vị | Chữ viết (+ bối cảnh sử dụng) | Ví dụ | | --- | ------ | --------------------------------------------------------------- | ------------------------------------ | | 1 | /-i-/ | y (+ âm đệm: /-u-/ hoặc âm đầu, âm đệm, âm cuối đều là /zero/) | huy, thúy, quýt, ý (kiến), thoát (y) | | 1 | /-i-/ | i (còn lại) | im, đi, nhìn, mình | | 2 | /-e-/ | ê | lên, bên, tênh | | 3 | /-ɛ-/ | e | em, mẹ, kém | | 4 | /-ɯ-/ | ư | từ, chữ, từng | | 5 | /-ɤ-/ | ơ | trơn, mơ, lớp | | 6 | /-a-/ | a | má, mái, qua, lại | | 7 | /-u-/ | u | dù, súng | | 8 | /-o-/ | ô | cổ, bốn, bông | | 8 | /-o-/ | ôô (ít) | bôông | | 9 | /-ɔ-/ | o | con, có, đói | | 9 | /-ɔ-/ | oo (ít) | xoong | | 10 | /-ɤ-/ | â | trần, sân, tầng | | 11 | /-ɛ-/ | a | anh ách, nhanh nhách | | 12 | /-ă-/ | a (+ âm cuối: /-w/, /-j/) | rau, tay, quay | | 12 | /-ă-/ | ă (còn lại) | ăn năn, chăn, đắng | | 13 | /-ɔ-/ | o (+ âm cuối: /-ŋ/, /-k/) | ong óc, mong, móc | | 14 | /-ie-/ | iê (+ âm cuối khác /zero/, âm đệm /zero/) | biển, biếng | | 14 | /-ie-/ | yê (+ âm cuối khác /zero/, âm đệm /-u-/ hoặc âm đầu /ʔ/) | khuyên, yếu, yểng, yểm | | 14 | /-ie-/ | ia (+ âm cuối /zero/, âm đệm /zero/) | bia, mía, tía | | 14 | /-ie-/ | ya (+ âm cuối /zero/, âm đệm /-u-/) | khuya, tuya | | 15 | /-ɯɤ-/ | ươ (+ âm cuối khác /zero/) | ưỡn, lươn, bướng, hươu | | 15 | /-ɯɤ-/ | ưa (+ âm cuối /zero/) | mưa, ưa, chừa | | 16 | /-uo-/ | uô (+ âm cuối khác /zero/) | buồn, uống | | 16 | /-uo-/ | ua (+ âm cuối /zero/) | ùa, chùa |
Hệ thống âm cuối
Hệ thống âm cuối: 6 phụ âm, 2 bán nguyên âm
| STT | Âm vị | Chữ viết (+ bối cảnh sử dụng) | Ví dụ | | --- | ------ | --------------------------------------- | ----------------------------------- | | 1 | /-m/ | m | ôm, nam, nem | | 2 | /-n/ | n | ôn, nan, nến | | 3 | /-p/ | p | ốp, hấp | | 4 | /-t/ | t | tắt, hất | | 5 | /-ŋ/ | nh (sau âm chính: /-i-/, /-e-/, /-ɛ-/) | inh, ênh, anh, xinh, mệnh, xanh | | 5 | /-ŋ/ | ng (còn lại) | ong, ông, ung, ưng, kèng, kiểng | | 6 | /-k/ | ch (sau âm chính: /-i-/, /-e-/, /-ɛ-/) | ich, ếch, ách, thích, chệch, bạch | | 6 | /-k/ | c (còn lại) | óc, úc, ác, cóc, cúc, các, lắc, nấc | | 7 | /-w/ | o (sau âm chính: /-a-/, /-ɛ-/) | áo, éo, báo, béo | | 7 | /-w/ | u (còn lại) | au, eo, êu, iu, cháu, kêu, chịu | | 8 | /-j/ | y (sau âm chính: /-ă-/, /-ɤ-/) | cáy, cấy | | 8 | /-j/ | i (còn lại) | cái, ngoái, cưới, cuối | | 9 | /zero/ | không thể hiện | bà, bố, mẹ |
Syllable Analysis
This project includes a script to analyze Vietnamese syllables from a text file and validate them using phonetic transcription.
To run the analysis, use the following command:
npx tsx src/syllable_analysis.tsResult:
Dictionary (all lines): 8,010
Valid syllables (transcribable): 7,413
Theoretical combinations: 151,632 [27 initials] × [3 glides] × [24 nuclei] × [13 codas] × [6 tones]
Comparisons:
- Valid vs Dictionary: 92.5%
- Valid vs Theoretical: 4.89%
- Dictionary vs Theoretical: 5.28%
Differences:
- Non-transcribable entries: 597
- Missing from dictionary: 143,622
Why Only 7413 Syllables of Dictionary Entries Are Transcribable?
- Foreign Words in the Dictionary
- Words like: accordeon, acid, albumin, alpha, ampere, antimon, aspirin, atlas. These are borrowed/foreign words that don't follow Vietnamese phonological rules.
- Your transcript system correctly rejects them as non-Vietnamese syllables.
- Technical/Scientific Terms
- Chemical compounds: aminoacid, ammoniac, amoniac.
- Technical terms: atlat, atmotphe, apatit.
- These often retain foreign pronunciation patterns.
- Abbreviations & Special Cases
- Shortened forms: al, ag, as.
- Currency codes: afghani, balboa, birr.
- Brand names and proper nouns.
Why Only 1.2% of Theoretical Combinations Exist?
- Phonological Constraints
- Not all consonant-vowel-tone combinations are pronounceable in Vietnamese.
- Vietnamese has strict rules about which sounds can combine.
- Example: Some initial consonants cannot precede certain vowels.
- Lexical Gaps
- Even if a combination is pronounceable, it might not form a meaningful word.
- Vietnamese vocabulary has evolved historically, leaving gaps in the sound space.
- Tonal Restrictions
- Some vowel-consonant combinations are restricted to certain tones.
- Checked syllables (ending in -p, -t, -c, -ch) can only have tones 1 and 5.
- Historical Language Evolution
- Vietnamese has lost some syllables over time.
- Sound changes have eliminated certain combinations.
- Modern Vietnamese is more constrained than the theoretical maximum.
:wave: Contributing
Contributions are always welcome!
Please read the contribution guidelines.
:scroll: Code of Conduct
Please read the Code of Conduct.
:warning: License
This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License.
See the LICENSE.md file for full details.
:handshake: Contact
Duong Vinh - @duckymomo20012 - [email protected]
Project Link: https://github.com/DuckyMomo20012/vietnamese-phonetic-transcript.

