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.2.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.2-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.2-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.2-cp310-abi3-win_amd64.whl (20.7 MB view details)

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

sea_g2p-0.5.2-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.2-cp310-abi3-macosx_11_0_arm64.whl (20.8 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

sea_g2p-0.5.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: sea_g2p-0.5.2.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.2.tar.gz
Algorithm Hash digest
SHA256 f9788729715566b3ba1f47409e8326c9bf9ada238fd5d0fa644837ecd416ad3f
MD5 275bb5e58267e6ab95add63f66c22dda
BLAKE2b-256 b27bd1ed2118cf2956b70f2bedd7252a1d377b05ffece70bbadb178f3821c4ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3a2f6e284f9a8190899e02569bc3c6078c8d587b578087957beb522487d504d1
MD5 93afe723faf5e4804b33e550dec20dee
BLAKE2b-256 6232f099c14c70dae2b1626febedc947b3f091df20d9b2d7308a8ac15648afde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e8046b4e454b40aea5aa64ef05c56da179b0b6b3d733e807e17059d61e3b0862
MD5 7d57edb59785a3377e7bd922ca0c2125
BLAKE2b-256 e340ec54cc52d9bbb22e165622ddbeca8d234168eb811f4fa6b8becebdca7971

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sea_g2p-0.5.2-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.2-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0774f56d4d73811039792d6a29d5b98faa87746603dd79b78f15152b0aaf3785
MD5 3f90bcf0d0569d2e328b138575b43134
BLAKE2b-256 19992197f128f68f538b4b16a6ee406366c5fe780fee35ca6df2ffc24ca140b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sea_g2p-0.5.2-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.2-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 2a684cd94dc4ea80e85184c2307829aaf145e581e0d9713ec5698293a39b0d49
MD5 7dfbf76e3b53234794091d84b4f89d9b
BLAKE2b-256 09e5a64ec2219d81ff8db62baf0b8db35f00971c4b32e4209a368ae2b556a57b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f27bccb81f1692a28214294d7ea8cb5d775644b3526f174e70214a72976083fc
MD5 cceeb0b387c97b1c1f860564c361f002
BLAKE2b-256 601bfe2429c3cdd583abb2eaa2a8e76a05e84d598e4aa75993edf8de0fea8cdb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4d20dd3652c870b4db6ac7d468f2d49cf55eb4230ec18f3cdadabebceedb21fa
MD5 bb99e0d2768d3ea599e73f2101be214e
BLAKE2b-256 950b07377671efa3ab242fd27fe9afd6f5574ed00af0e1395f6c5fe5b026974c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.2-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b4fb086f6b77d498e5fd53c2df5e9a0ef31383c64cda33f3012d640818ef8f8f
MD5 d4748e05c98194ec75f0e65bd9905115
BLAKE2b-256 4d7118d9a2c622c5137c2d6719e37b1424fa77f942cd47e860ac10b609489689

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 61720d364805098b321051f22ba541d59e6cf2ccb206f04b211114b232306f4c
MD5 75b13ba7e12d86aba49037d900ca0e27
BLAKE2b-256 af0d2f1ee7cfe0e0dad8401ecac9be865c80acc5771e204df14e01a936424c20

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