Skip to main content

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

Project description

🦭 SEA-G2P

image

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:

  1. Clone the repository:

    git clone https://github.com/pnnbao97/sea-g2p
    cd sea-g2p
    
  2. Install in editable mode:

    pip install -e .
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sea_g2p-0.5.5.tar.gz (20.0 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

sea_g2p-0.5.5-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (20.9 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

sea_g2p-0.5.5-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (20.9 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

sea_g2p-0.5.5-cp310-abi3-win_amd64.whl (20.7 MB view details)

Uploaded CPython 3.10+Windows x86-64

sea_g2p-0.5.5-cp310-abi3-win32.whl (20.6 MB view details)

Uploaded CPython 3.10+Windows x86

sea_g2p-0.5.5-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (20.9 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

sea_g2p-0.5.5-cp310-abi3-macosx_11_0_arm64.whl (20.8 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

sea_g2p-0.5.5-cp310-abi3-macosx_10_12_x86_64.whl (20.9 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

sea_g2p-0.5.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (21.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file sea_g2p-0.5.5.tar.gz.

File metadata

  • Download URL: sea_g2p-0.5.5.tar.gz
  • Upload date:
  • Size: 20.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for sea_g2p-0.5.5.tar.gz
Algorithm Hash digest
SHA256 101242ce1a3d2e571d6a2d93c62389f18b84c32b382604c3511f28400cd32d4d
MD5 21793def0542b888a5c2648e59435f38
BLAKE2b-256 cda5cfb01e5b3defbac487fe99f82c14226df5f12baa34eeee51735172ca5e4b

See more details on using hashes here.

File details

Details for the file sea_g2p-0.5.5-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for sea_g2p-0.5.5-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 15b0f80692e7133fc28d1f005bcd0b0646a9a5b2ba56531960f249704e781230
MD5 ea4546c5bf9cb2454bb50d963f0e8ccf
BLAKE2b-256 30b89f696e67a2daf70f62b34f98311282762d65316330a9e5b89852245d968c

See more details on using hashes here.

File details

Details for the file sea_g2p-0.5.5-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for sea_g2p-0.5.5-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f49467eeb9c8e7f6133e19ccaa9a0a8c0d6f6f4ee3d4b7a671d884eb88377d2a
MD5 cce878673d6150edbb7e6ba11957b451
BLAKE2b-256 47aa67c9285d688e74e17e5a6f5b407f64cddc38812dacc48ebf82de091d1437

See more details on using hashes here.

File details

Details for the file sea_g2p-0.5.5-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: sea_g2p-0.5.5-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

Hashes for sea_g2p-0.5.5-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 79c585db658e469bdab459e7c5562764af2c7ab2eac8d561a4c52665a5121005
MD5 a66bcd2731b6b8f0ebd5bf76344746e7
BLAKE2b-256 6e91f6966760179116471acb165bbbb39ede331663455dea12a224475ff42add

See more details on using hashes here.

File details

Details for the file sea_g2p-0.5.5-cp310-abi3-win32.whl.

File metadata

  • Download URL: sea_g2p-0.5.5-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

Hashes for sea_g2p-0.5.5-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 35baad5a3ead91ec9d6be1819f6abfe30b4a728b24a057910b7921b01743ed46
MD5 e17524dc98178776a12e17105480aa8b
BLAKE2b-256 d58ebf9a251561b4dd856e7bc30237f92252823bbb790409fe7e28eeb273ab4c

See more details on using hashes here.

File details

Details for the file sea_g2p-0.5.5-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for sea_g2p-0.5.5-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b0d88003aa67646e0849bd9b44cf06a7a71f73ad9a12f8bf8dd04c0fbe4f1589
MD5 6e903827ed4d3290201de40a06d09a22
BLAKE2b-256 9d81020781dad8f2b0cd4884aac5ff812a5873e4b68ab6ad9b9aeb514e416549

See more details on using hashes here.

File details

Details for the file sea_g2p-0.5.5-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sea_g2p-0.5.5-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 836cb671dfb57c834b301f432fd0acc99a01e899144d2dae7b2928489ede3778
MD5 19cb595797f31d7ff784b216c36136a1
BLAKE2b-256 3cda7a0513d5cbc5bd1e2ae5183ddaa2612f3b9c5fdb512b9f3e94a00f2f1ed4

See more details on using hashes here.

File details

Details for the file sea_g2p-0.5.5-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for sea_g2p-0.5.5-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 764fe92d307b08171fffe3522c6ac77c9eaeef4e3b23bdffea113c7e7691a633
MD5 84c6364ba276bfdcdadf37b9e783d997
BLAKE2b-256 77dc05374eecdda78d10c4fd2fc5cd48bcdaef1658d62ca7e7ecf1bedbf6d159

See more details on using hashes here.

File details

Details for the file sea_g2p-0.5.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sea_g2p-0.5.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e3c7e3b2af124ee89a7cc210a79a67cc80c7f569fecb3e6101596d6bb7ae4ce9
MD5 40e40add0cd1e9fd7045562bf8c3b482
BLAKE2b-256 b2affb0ce37353ae8cb8c2666a36457c50318d3d11ba4b4fcb0721021dc09fa3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page