Skip to main content

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.

Installation

pip install sea-g2p

Requires espeak-ng only for fallback (built-in dictionary already covers ~99.9% of words).

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)

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)
phonemes = g2p.convert(normalized)
print(phonemes)

Features

  • Fast dictionary-based lookup using SQLite.
  • Vietnamese text normalization (numbers, dates, units).
  • Bilingual support (Vietnamese/English).
  • Batch processing for efficiency.
  • eSpeak-NG 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.1.0.tar.gz (38.0 MB view details)

Uploaded Source

Built Distribution

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

sea_g2p-0.1.0-py3-none-any.whl (38.0 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sea_g2p-0.1.0.tar.gz
  • Upload date:
  • Size: 38.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for sea_g2p-0.1.0.tar.gz
Algorithm Hash digest
SHA256 784c019957c64b3cd190a25d5f906d91ee8f455cc4b23e08c167d69334b9ce14
MD5 9c7aba33e167588d0ea908a79a97ad8f
BLAKE2b-256 8d145fcb26f69cb1c23b55a76efb42094837f95102ab31e30bf071172f430a9a

See more details on using hashes here.

File details

Details for the file sea_g2p-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sea_g2p-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for sea_g2p-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 576be1036efe0922404824a3f07758748f9fb06c596c25eb9ae490d3855a8535
MD5 11d74db156ccc77ddf33448e314cc441
BLAKE2b-256 01e4975558d8a833edcab53a998bebee21774527d4b1f1d1fd63f252a97ca35c

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