Metadata-Version: 2.1
Name: espnet-tts-frontend
Version: 0.0.2
Summary: UNKNOWN
Home-page: http://github.com/espnet/espnet_tts_frontend
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: POSIX :: Linux
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
Requires-Dist: unidecode (>=1.0.22)
Requires-Dist: inflect (>=1.0.0)
Requires-Dist: underthesea
Requires-Dist: jaconv
Requires-Dist: g2p-en
Requires-Dist: pypinyin
Provides-Extra: doc
Provides-Extra: test

# ESPnet TTS Frontend
[![PyPI version](https://badge.fury.io/py/espnet-tts-frontend.svg)](https://badge.fury.io/py/espnet-tts-frontend)
[![Python Versions](https://img.shields.io/pypi/pyversions/espnet-tts-frontend.svg)](https://pypi.org/project/espnet-tts-frontend/)
[![Downloads](https://pepy.tech/badge/espnet-tts-frontend)](https://pepy.tech/project/espnet-tts-frontend)
![CI](https://github.com/espnet/espnet_tts_frontend/workflows/CI/badge.svg)

A tools collection of text frontend for [ESPnet](https://github.com/espnet/espnet) tts recipes. 

## Install
```bash
pip install espnet_tts_frontend
```

### Install with pyopenjtalk

- Requires cmake and cython

```bash
git clone https://github.com/espnet/espnet_tts_frontend
cd espnet_tts_frontend/
python setup.py pyopenjtalk
# OR
# pip install --global-option=pyopenjtalk -e espnet_tts_frontend
```

FIXME(kamo):  Support direct installation from git repo.

## Usage

### English:
#### tacotron_cleaner
Derived from https://github.com/keithito/tacotron

```python
>>> import tacotron_cleaner.cleaners
>>> tacotron_cleaner.cleaners.custom_english_cleaners("(Hello-World);   &  jr. & dr.")
'HELLO WORLD, AND JUNIOR AND DOCTOR'
```
#### g2p_en
https://github.com/Kyubyong/g2p

```python
>>> from g2p_en import G2p  # Automatically run downloading for the first time
[nltk_data] Downloading package averaged_perceptron_tagger to
...
>>> g2p = G2p()
>>> g2p("hello world")
['HH', 'AH0', 'L', 'OW1', ' ', 'W', 'ER1', 'L', 'D']
```

### Japanese
#### jaconv
https://github.com/ikegami-yukino/jaconv/

```python
>>> jaconv.normalize("”あらゆる”　現実を　〜　’すべて’ 自分の　ほうへ　ねじ曲げたのだ。")
'"あらゆる" 現実を ー \'すべて\' 自分の ほうへ ねじ曲げたのだ。'
```

#### pyopenjtalk
https://github.com/r9y9/pyopenjtalk

```python
# Automatically run downloading for the first time
>>> pyopenjtalk.g2p("あらゆる 現実を すべて 自分の ほうへ ねじ曲げたのだ。", kana=True)
'アラユル\u3000ゲンジツヲ\u3000スベテ\u3000ジブンノ\u3000ホーエ\u3000ネジマゲタノダ。'
>>> pyopenjtalk.g2p("あらゆる 現実を すべて 自分の ほうへ ねじ曲げたのだ。", kana=False)
'a r a y u r u pau g e N j i ts u o pau s u b e t e pau j i b u N n o pau h o o e pau n e j i m a g e t a n o d a'
```

### Vietnamese
#### vietnamese_cleaner

```python
>>> import vietnamese_cleaner.vietnamese_cleaner
```


