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

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

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

Uploaded CPython 3.10+macOS 11.0+ ARM64

sea_g2p-0.5.4-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.4-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.4.tar.gz.

File metadata

  • Download URL: sea_g2p-0.5.4.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.4.tar.gz
Algorithm Hash digest
SHA256 cfb6fbefcd254d691578f60af2b8528acee10acc2c2938e22bd88a61389c74d2
MD5 f6b7a057cd4cb2e3d846b838ed09b53d
BLAKE2b-256 901ee50c0c6d0f69c36fae7dd6cef652c40ff0397d53217be63187a324ed5691

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 119f24a30dfdc4ffd047f1c7b27e0ca26e5f1e3ca4f7a8f11ff9d58100df54ed
MD5 678130220003702e96119b2830594692
BLAKE2b-256 29332c99c013181ee7232eb205e65a2df69dbe4bb4d0182f78422071b8f1eb95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2eb8e7d522834195c37553ce1d95b14b13679c6d93c6f444eb32eb074afe54b9
MD5 e8112236cae6f1069295199ddb6e2f67
BLAKE2b-256 9e255fc00500a6bb1e52101f6083668f90192bd4ce429c24c103fa1769a8dd5b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sea_g2p-0.5.4-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.4-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 cdffaa23e3021b673d04dbcb138d1f3afd3376c71a966aef234b00fd7640a51a
MD5 7f313009399509f4d2491e0aaca5375e
BLAKE2b-256 3a7633521b15ebcd836b059fbff26dbde3b9508afeaf5269da20b87ee223e6ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sea_g2p-0.5.4-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.4-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 8e3f17a48839eec3f0951be849e52d81e8629a1a3cc96889052e8b368b612d3c
MD5 57d835b587c4fbb5cc86d62770a672c8
BLAKE2b-256 a09eb537efd70e57adc640308a722c6d6783fceb3a7d4bf04da2a19de2b8a908

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9e3e2c13bcfd771ac3018d0232a4202721e9d6daa88b58752ba4adef5e786af6
MD5 0caf80bb13969792fa938635cc4cb78c
BLAKE2b-256 57282fdf5a4d297ad5e9d880092c3a2b21295d39a0dfe7e5995cf05c2df7843e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.4-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 823f2e09fd8b4520ddc08e8abd8df24ee010670c4e96257f0fcf9e4a95f22a52
MD5 3aa25fac987be4645534046b31e82b06
BLAKE2b-256 aba6a805b5ca019faea6b611fffc12c74b5dcbc9b5761c4efcb6d0441a0158c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.4-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 85c5d632e31530b72ce03b163f37a15c3ed8e1e5f30348fe0f6b359397d0d93f
MD5 372313b887fd943a9b7bc4d73495d26d
BLAKE2b-256 2353504949d615107aa57576d93f23055f0fde8f7c3b55100b17849a0604a0cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8e6f1a9c240c6ab83cb0cb01a389292cdabbd797488b17d4549c6afa5100a515
MD5 530bab461edefa7a3fd42619c1ea7728
BLAKE2b-256 4cb32e50cf8c601bc27a3aef89825ecd5d6eed3780846978bcce9151f481b21e

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