skillfed

sea-g2p

Fast multilingual text-to-phoneme converter for South East Asian languages.

sea-g2p v0.8.5 168.6K downloads/30d#10,444 on PyPI112
Permissive license Active released

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-g2p

uv

uv add sea-g2p

poetry

poetry add sea-g2p

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Multimedia :: Sound/Audio :: SpeechTopic :: Scientific/Engineering :: Artificial Intelligence

Tags

text to phoneme converterg2p vietnamese thai indonesianmultilingual phonemizationtts phoneme generationsoutheast asian text-to-speechgrapheme to phonemespeech synthesis phonemes
phonemizationmultilingual-nlpspeech-synthesis

More Artificial Intelligence packages