sea-g2p
Fast multilingual text-to-phoneme converter for South East Asian languages.
What it is and what it does
SEA-G2P is a text-to-phoneme converter (grapheme-to-phoneme, or G2P) built in Rust and designed for Vietnamese, Thai, and Indonesian with seamless English code-switching. It takes raw text—including numbers, dates, abbreviations, and mixed-language passages—and outputs IPA phonemes grouped by syllable, suitable for feeding into a text-to-speech engine. The package handles the messy normalization and segmentation that each language requires: Vietnamese has 17 normalization stages, Thai requires word segmentation from a 91,865-word dictionary, and Indonesian uses a 172,557-word dictionary built from WikiPron and KBBI.
The core engine uses memory-mapped binary dictionaries and binary search for fast lookup, with automatic multithreading for batch inputs. It ships as pre-compiled wheels with zero runtime dependencies, so installation is straightforward on Windows, Linux, and macOS. The package is actively maintained and powers VieNeu-TTS, a Vietnamese text-to-speech model.
Use it for:
- Building a Vietnamese, Thai, or Indonesian text-to-speech system that needs accurate phoneme sequences from raw text.
- Processing large batches of multilingual text with mixed English code-switching for phonetic analysis or speech synthesis.
- Normalizing and converting numbers, dates, and abbreviations to spoken form in Southeast Asian languages.
- Integrating phonemization into an on-device speech synthesis pipeline where startup time and memory footprint matter.
- Handling Thai text without spaces by automatic word segmentation and phoneme generation in a single pass.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts text to phonemes for Vietnamese, Thai, and Indonesian with English code-switching support, using a memory-mapped binary dictionary and Rust-based engine for fast batch processing.
Yes, if you need phonemization for Vietnamese, Thai, or Indonesian with English code-switching. The package is actively maintained, has no runtime dependencies, and is built for production use with fast batch processing. Install friction is moderate (compiled wheels) but manageable. Permissive license and zero known vulnerabilities make it safe to adopt. Not relevant if you only work with other languages.
Install
sea-g2p on PyPI
pip
pip install sea-g2puv
uv add sea-g2ppoetry
poetry add sea-g2pInstalling sea-g2p
Before you install
Medium install friction due to compiled wheels (cp310-abi3 binaries for multiple platforms), but pre-built wheels are available for Windows, Linux, and macOS. Active maintenance with recent release and no runtime dependencies.
License in practice
Permissive license (Apache) allows commercial and private use without restriction, making it suitable for production TTS systems.
Quickstart
pip install sea-g2p
from sea_g2p import SEAPipeline
pipeline = SEAPipeline(lang="vi")
result = pipeline.run("Giá SP500 hôm nay là 4.200,5 điểm.")
print(result)
Requires Python 3.10 or later; wheels are pre-compiled for specific platforms (Windows, Linux, macOS on x86_64 and ARM64).
Verify before relying
- Actual throughput figures (41,000–500,000 sentences/s) on typical developer hardware; benchmarks cited are from 1,000,000-sentence dataset on Windows 11 CPython 3.12.
- Memory overhead and startup time in production; mmap design is described but real-world measurements not provided.
- Quality of phoneme output against other phonemizers; no comparative evaluation data in fact sheet.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 168,557/month — #10,444 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sea_g2p-0.8.5-cp310-abi3-macosx_10_12_x86_64.whl; sea_g2p-0.8.5-cp310-abi3-macosx_11_0_arm64.whl; sea_g2p-0.8.5-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; sea_g2p-0.8.5-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; sea_g2p-0.8.5-cp310-abi3-win32.whl; sea_g2p-0.8.5-cp310-abi3-win_amd64.whl
Keywords: text-to-speech, tts, vietnamese, g2p, phonemizer, speech-synthesis, real-time, on-device, south-east-asia
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
misakiConverts written text to phonetic…
permissive · top 15,000 on PyPI
g2p-enConverts English text to phoneme sequences…
permissive · top 5,000 on PyPI
pyviProvides Vietnamese language processing tools…
permissive · top 15,000 on PyPI
wetextNormalizes and denormalizes text in Chinese,…
permissive · top 15,000 on PyPI
phonemizerPhonemizer converts written text into phonetic…
copyleft · top 15,000 on PyPI
phonemizer-forkConverts text to phonetic representations…
copyleft · top 5,000 on PyPI
gruutGruut tokenizes, cleans, and converts text to…
permissive · top 15,000 on PyPI
pythainlpPyThaiNLP provides Thai-language natural…
permissive · top 5,000 on PyPI
SastrawiSastrawi reduces inflected Indonesian words to…
permissive · top 15,000 on PyPI
py-rust-stemmersProvides fast, parallel word stemming using…
unclear · top 5,000 on PyPI