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

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

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

Uploaded CPython 3.10+macOS 11.0+ ARM64

sea_g2p-0.5.3-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.3-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.3.tar.gz.

File metadata

  • Download URL: sea_g2p-0.5.3.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.3.tar.gz
Algorithm Hash digest
SHA256 b5b38d46f89821b7b28204447e5f9858966d6d413c7c5130d01db72c6ff11c68
MD5 9343f154b05363d8a5b38d0f2ea10320
BLAKE2b-256 80e2b505a7081ee6a180352c61b31046c695130c0ce20f88af77698d202689ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cf2f97f780f42b6074788289b1d3ea3ff726926ec57cc67768c7f0e7ba6ca20a
MD5 3461b3a5be3b35ba16fa49f2b26f549b
BLAKE2b-256 2e03c20958c213ec1f8ece333b52a000e6a2fd72f59445dbc87b3f9c278e394d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 207a45d6d6dabea3ccab31ba272a87341f63b3d7f561dde463c975f866dd81b4
MD5 ede440cc09aa3bff2fce6b37b87c90ae
BLAKE2b-256 e6c3cc81ec7a70e0fac759275a1481b56fa6c95cf128dc39434739127c869c72

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sea_g2p-0.5.3-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.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0aea78605fb93314c730aac87525eda61fb7f23d561bb959d8ad35b7f0bd7451
MD5 8bb69998494ad8c56fab919213af9bbd
BLAKE2b-256 26ab0ffddf166a9730524aa923ec4e70bd4f038d62a2ccf326a702bb69456397

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sea_g2p-0.5.3-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.3-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 1ca4125b8c4e3877bd23f70eb6b3eb6d9034b42b46e8505bc430d7ea1224f31a
MD5 008235234e309e81d992b45f1c8b52af
BLAKE2b-256 25e5cd9cd527d1f0dae2875650051304dc28522b4d730c84be66a17e3d8499e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5d3d52a8be737403e9dd9b035a60384cecd0281e41638f9daeef96f674c84512
MD5 7ac06ff04fe5cc90241ead494ee75d9f
BLAKE2b-256 6183b31f0d286fa7350b39d9b68d230822ccceafaf93c84da86a5f736c158098

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b4b20fd57dd70763eb58c986ca4fae7d8426caa50969373147582af1dbb6e113
MD5 0d1d6e84223d31bcec5ac42a0c91bdf6
BLAKE2b-256 105de2e1e64999796400636b02dc6b3ebd779c97a095903a9c4fbc532312d169

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.3-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f87edbd22b4ea3b78fc1a199a972cecaa31d1f159810ea56ee20d5b8927adb2b
MD5 696e22a44733dd587796d20daf03cc1e
BLAKE2b-256 6374b7181b644f476875cb2a412a0598ecc91db9f479d4217e4c0005fbb1f347

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sea_g2p-0.5.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d6affcdc11bbd32fb733953ba1f097eebb696972ef8020bf65fbaed36aad1fb1
MD5 0bb408016adb8c88683d619dbbf328f2
BLAKE2b-256 62bc671f9a59465d960f3ae94a14a0b31bd29b93b19ad222c1b2d3d62ccd54b4

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