Skip to main content

Python package for convert text to phoneme ipa, use for cross language embedding Text-to-speech Reseach

Project description

Project Custom from vPhon for convert Raw text to IPA

  • Use for embeding TTS model using Tacotron2

  • By using IPA, tacotron2 can deal with cases cross language as a proposal from futre paper

  • Include diary research in phoneme of Vietnamese, painful and character of Viet

  • Function include: Convert Grapheme to IPA, List same token output, normalize text with vinorm and wordtoken

  • Requirment: vinorm, underthesea, eng_to_ipa

pip install vinorm
pip install underthesea
pip install eng_to_ipa

Usage:

from viphoneme import vi2IPA
phoneme = vi2IPA("Được viết vào 6/4/2020, có thể xử lí những trường hợp chứa English")

>> dɯək6 viət5 vaw2 ʂăw5 tʰaŋ5 bon5 năm1 haj1 ŋin2 xoŋ͡m1 ʈăm1 haj1_mɯəj1 , kɔ5_tʰe4 sɯ4_li5 ɲɯŋ3 ʈɯəŋ2_hɤp6 cɯə5 ˈɪŋlɪʃ

Function to convert to phoneme with option split each element

from viphoneme import vi2IPA_split
delimit ="/"
vi2IPA_split("Được viết vào 6/4/2020, có thể xử lí những trường hợp chứa English", delimit)

>> /d/ɯə/k/6/ /v//t/5/ /v/a/w/2/ /ʂ/ă/w/5/ //a/ŋ/5/ /b/o/n/5/ /n/ă/m/1/ /h/a/j/1/ /ŋ/i/n/2/ /x/o/ŋ͡m/1/ /ʈ/ă/m/1/ /h/a/j/1/_/m/ɯə/j/1/ /,/ /k/ɔ/5/_//e/4/ /s/ɯ/4/_/l/i/5/ /ɲ/ɯ/ŋ/3/ /ʈ/ɯə/ŋ/2/_/h/ɤ/p/6/ /c/ɯə/5/ /ɪ/ŋ/l/ɪ/ʃ/ /./

Parsing, split phoneme element, with listParse is list of avaible symbol, delimit is symbol to split each element

Parsing(listParse, text, delimit)

Get list of symbol using for represent phoneme

from viphoneme import syms
print(syms)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

viphoneme-1.0.5-py3-none-any.whl (52.4 kB view details)

Uploaded Python 3

File details

Details for the file viphoneme-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: viphoneme-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 52.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.6.10

File hashes

Hashes for viphoneme-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ac60fbba58ff5b82ce54d83b8e50692314e95a84eaf439ef021c3bd65c79f8c6
MD5 121cbae56b56a78cbd48cab8c3a387a1
BLAKE2b-256 3404b7760710f677abdd31aab8c98ba552b9913e9c33dcd56760ede4cfe692bd

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