Skip to main content

Project Custom from vPhon for convert Raw text to IPA

  • Use for embeding TTS model using Tacotron2/Fastspeech2 ...

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

  • 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
  • Install viphoneme by pip
pip install viphoneme

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/iə/t/5/ /v/a/w/2/ /ʂ/ă/w/5/ /tʰ/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/_/tʰ/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)
  • Star me if you find it interesting :))

  • Cite me if you use it for paper :)):

@inproceedings{tri2020vietnamese,
  title={Vietnamese Speech Synthesis with End-to-End Model and Text Normalization},
  author={Tri, Nguyen Minh and Nam, Cao Xuan and others},
  booktitle={2020 7th NAFOSTED Conference on Information and Computer Science (NICS)},
  pages={179--184},
  year={2020},
  organization={IEEE}
}
  • This is for quick using to test TTS model in Vietnamese, there is too much more task to use it for production, such as OOV (You can handle it by using MFA from Kaldi or Transformer Aligner)

Metadata

Release files for viphoneme 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for viphoneme 3.0.0
File Size Uploaded
viphoneme-3.0.0.tar.gz 56.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for viphoneme 3.0.0
File Interpreter ABI Platform
viphoneme-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 115.8 kB

Release files / viphoneme-3.0.0.tar.gz

Download URL viphoneme-3.0.0.tar.gz
Size 56.9 kB
Tags Source
SHA-256 checksum
How to use checksums
53763830d4de8422446767f8229937161c7e18d3508f0c6f4ac09799da559b38
BLAKE2b-256 checksum
How to use checksums
34825b597b75d53466b81e77fe2ae7365ff6da3bcf9f90b6bcf7510ce15b7eac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

Release files / viphoneme-3.0.0-py3-none-any.whl

Download URL viphoneme-3.0.0-py3-none-any.whl
Size 58.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d13900c94a4ca554c38c09e43f29a809366568fbff93259e48284881db59ef6e
BLAKE2b-256 checksum
How to use checksums
b42698e5235dc3bd94fe0bafc96a373810ba711b764f7fb71f6c28d13f13f03c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page