Fast multilingual text-to-phoneme converter for South East Asian languages.
Project description
🦭 SEA-G2P
Fast multilingual text-to-phoneme converter for South East Asian languages.
Author: Pham Nguyen Ngoc Bao
Installation
pip install sea-g2p
Usage
Simple Pipeline
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)
#zˈaːɜ ˈɛɜt̪ pˈe nˈam tʃˈam hˈom nˈaj lˌaː2 bˈoɜn ŋˈi2n hˈaːj tʃˈam fˈəɪ4 nˈam ɗˈiɛ4m.
Individual Modules
from sea_g2p import Normalizer, G2P
normalizer = Normalizer(lang="vi")
g2p = G2P(lang="vi")
text = "Giá SP500 hôm nay là 4.200,5 điểm"
normalized = normalizer.normalize(text)
print(normalized)
phonemes = g2p.convert(normalized)
print(phonemes)
#giá ét pê năm trăm hôm nay là bốn nghìn hai trăm phẩy năm điểm.
#zˈaːɜ ˈɛɜt̪ pˈe nˈam tʃˈam hˈom nˈaj lˌaː2 bˈoɜn ŋˈi2n hˈaːj tʃˈam fˈəɪ4 nˈam ɗˈiɛ4m.
Features
- Blazing Fast: Core engine rewritten in Rust with binary mmap lookup.
- Zero Dependency: Pre-compiled wheels for Windows, Linux, and macOS.
- Smart Normalization: Specialized for Vietnamese (numbers, dates, technical terms).
- Bilingual Support: Handles mixed Vietnamese/English text seamlessly.
- Character Fallback: Built-in intelligent fallback for unknown words.
Development
To install for development purposes:
-
Clone the repository:
git clone https://github.com/pnnbao97/sea-g2p cd sea-g2p
-
Install in editable mode:
pip install -e .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sea_g2p-0.5.1.tar.gz.
File metadata
- Download URL: sea_g2p-0.5.1.tar.gz
- Upload date:
- Size: 20.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8077d3429bd0ba840cc9d7f7032db9da7f34ab53ebd3ecba40b0aad48aaf9ea7
|
|
| MD5 |
e8e3ff9abf3b8275af0e7b7d61ceeff7
|
|
| BLAKE2b-256 |
f0032e71be8515fec8946bfda55e3ad4f37a536dee8d1f065f05227337c164d4
|
File details
Details for the file sea_g2p-0.5.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: sea_g2p-0.5.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 20.9 MB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2db83c9b25e6896ecc558784bc4997ea928dcc4568f1f406b1b3dd9dfa2b4028
|
|
| MD5 |
f87d047f5be956805d61bf527469f0f4
|
|
| BLAKE2b-256 |
73d94662b35658f86225c6237479605c8bd9e1f512cb9a1d48c25cc8fe98f53d
|
File details
Details for the file sea_g2p-0.5.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: sea_g2p-0.5.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 20.9 MB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
226ac77296fd8bc39a8dc703dce8f5e325797e0b79287bbc52c71d7de10ced9e
|
|
| MD5 |
248d25207a56b4bc72c6455abd39753d
|
|
| BLAKE2b-256 |
498a75cdc610111f3e3c0be809cd7f06732e0ddf0562bccf0e73f952fd726199
|
File details
Details for the file sea_g2p-0.5.1-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: sea_g2p-0.5.1-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 20.7 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
121b2cc34722d8e834322caca490cd5a0d908d51ac72a32138ce8be26c44f92a
|
|
| MD5 |
e3dff209b826086c5debbc5294508ab5
|
|
| BLAKE2b-256 |
17f999ec61d49223675d6f536e8621f9b027f2207423f1049e237bf5d11df487
|
File details
Details for the file sea_g2p-0.5.1-cp310-abi3-win32.whl.
File metadata
- Download URL: sea_g2p-0.5.1-cp310-abi3-win32.whl
- Upload date:
- Size: 20.6 MB
- Tags: CPython 3.10+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fccc3a0c1475bf683dfabfacbbe64a15b3a4965f081dda8bed48fc6f7dc54ca5
|
|
| MD5 |
20ec9896f76e10edce15288e7b2d90ca
|
|
| BLAKE2b-256 |
36e6e5966604b46cbac3a9e434106b1824358d6bb8383c41925234679c6fc5fb
|
File details
Details for the file sea_g2p-0.5.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: sea_g2p-0.5.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 20.9 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55c0e572864608e7b754cb19ca5d5cfbe37b6dbb1bb6b218850abd6037c07cf3
|
|
| MD5 |
ef87a7882903ec00e5799b3b5469eeaa
|
|
| BLAKE2b-256 |
95294f31593a49b9cdf1e6d37014009381ea73a57876ca372737646e137203e4
|
File details
Details for the file sea_g2p-0.5.1-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: sea_g2p-0.5.1-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 20.8 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c564727fae3d4a0193b2801dd0654e7f91bd30d99966cfe873b2a1d98a73881b
|
|
| MD5 |
139b35151300f0d5a559fee0168d6150
|
|
| BLAKE2b-256 |
61bb5ff88b422d5bddc3c9dd91428209a082eef98f5ceb8e53dea902b7d8e53e
|
File details
Details for the file sea_g2p-0.5.1-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: sea_g2p-0.5.1-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 20.9 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
458b67c831936d124d876ad9f54bf43c9579dab0cb0c894ed15cecf584d8b881
|
|
| MD5 |
5032f219cacacfccfccb83454cfc47a8
|
|
| BLAKE2b-256 |
c026e706c35dac71cc6298c232ae4cb807334f88019d7b7e3531806dd522800d
|
File details
Details for the file sea_g2p-0.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: sea_g2p-0.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 21.0 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9924d3655d9c27b05c306a6fabf742a818298a670c4c7351dcda66aafdd3bcbd
|
|
| MD5 |
d149b63533d30520304128f1bab6705d
|
|
| BLAKE2b-256 |
d06e99de44f22b6030e3b86e5a12f7f664a6ac9fd1b8283688b0210306955f0e
|