• Stars
    star
    143
  • Rank 257,007 (Top 6 %)
  • Language
    Python
  • License
    Other
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python wrapper for OpenJTalk

pyopenjtalk

PyPI Python package Build Status License DOI

A python wrapper for OpenJTalk.

The package consists of two core components:

  • Text processing frontend based on OpenJTalk
  • Speech synthesis backend using HTSEngine

Notice

  • The package is built with the modified version of OpenJTalk. The modified version provides the same functionality with some improvements (e.g., cmake support) but is technically different from the one from HTS working group.
  • The package also uses the modified version of hts_engine_API. The same applies as above.

Before using the pyopenjtalk package, please have a look at the LICENSE for the two software.

Build requirements

The python package relies on cython to make python bindings for open_jtalk and hts_engine_API. You must need the following tools to build and install pyopenjtalk:

  • C/C++ compilers (to build C/C++ extentions)
  • cmake
  • cython

Supported platforms

  • Linux
  • Mac OSX
  • Windows (MSVC) (see this PR)

Installation

pip install pyopenjtalk

Development

To build the package locally, you will need to make sure to clone open_jtalk and hts_engine_API.

git submodule update --recursive --init

and then run

pip install -e .

Quick demo

Please check the notebook version here (nbviewer).

TTS

In [1]: import pyopenjtalk

In [2]: from scipy.io import wavfile

In [3]: x, sr = pyopenjtalk.tts("ใŠใ‚ใงใจใ†ใ”ใ–ใ„ใพใ™")

In [4]: wavfile.write("test.wav", sr, x.astype(np.int16))

Run text processing frontend only

In [1]: import pyopenjtalk

In [2]: pyopenjtalk.extract_fullcontext("ใ“ใ‚“ใซใกใฏ")
Out[2]:
['xx^xx-sil+k=o/A:xx+xx+xx/B:xx-xx_xx/C:xx_xx+xx/D:xx+xx_xx/E:xx_xx!xx_xx-xx/F:xx_xx#xx_xx@xx_xx|xx_xx/G:5_5%0_xx_xx/H:xx_xx/I:xx-xx@xx+xx&xx-xx|xx+xx/J:1_5/K:1+1-5',
'xx^sil-k+o=N/A:-4+1+5/B:xx-xx_xx/C:09_xx+xx/D:xx+xx_xx/E:xx_xx!xx_xx-xx/F:5_5#0_xx@1_1|1_5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F:5_5#0_xx@1_1|1_5/G:xx_xx%xx_xx_xx/H:xx_xx/I:1-5@1+1&1-1|1+5/J:xx_xx/K:1+1-5',
'i^w-a+sil=xx/A:0+5+1/B:xx-xx_xx/C:09_xx+xx/D:xx+xx_xx/E:xx_xx!xx_xx-xx/F:5_5#0_xx@1_1|1_5/G:xx_xx%xx_xx_xx/H:xx_xx/I:1-5@1+1&1-1|1+5/J:xx_xx/K:1+1-5',
'w^a-sil+xx=xx/A:xx+xx+xx/B:xx-xx_xx/C:xx_xx+xx/D:xx+xx_xx/E:5_5!0_xx-xx/F:xx_xx#xx_xx@xx_xx|xx_xx/G:xx_xx%xx_xx_xx/H:1_5/I:xx-xx@xx+xx&xx-xx|xx+xx/J:xx_xx/K:1+1-5']

Please check lab_format.pdf in HTS-demo_NIT-ATR503-M001.tar.bz2 for more details about full-context labels.

Grapheme-to-phoeneme (G2P)

In [1]: import pyopenjtalk

In [2]: pyopenjtalk.g2p("ใ“ใ‚“ใซใกใฏ")
Out[2]: 'k o N n i ch i w a'

In [3]: pyopenjtalk.g2p("ใ“ใ‚“ใซใกใฏ", kana=True)
Out[3]: 'ใ‚ณใƒณใƒ‹ใƒใƒฏ'

About run_marine option

After v0.3.0, the run_marine option has been available for estimating the Japanese accent with the DNN-based method (see marine). If you want to use the feature, please install pyopenjtalk as below;

pip install pyopenjtalk[marine]

And then, you can use the option as the following examples;

In [1]: import pyopenjtalk

In [2]: x, sr = pyopenjtalk.tts("ใŠใ‚ใงใจใ†ใ”ใ–ใ„ใพใ™", run_marine=True) # for TTS

In [3]: label = pyopenjtalk.extract_fullcontext("ใ“ใ‚“ใซใกใฏ", run_marine=True) # for text processing frontend only

LICENSE

Acknowledgements

HTS Working Group for their dedicated efforts to develop and maintain Open JTalk.

More Repositories

1

wavenet_vocoder

WaveNet vocoder
Python
2,187
star
2

deepvoice3_pytorch

PyTorch implementation of convolutional neural networks-based text-to-speech synthesis models
Python
1,852
star
3

gantts

PyTorch implementation of GAN-based text-to-speech synthesis and voice conversion (VC)
Jupyter Notebook
508
star
4

pysptk

A python wrapper for Speech Signal Processing Toolkit (SPTK).
Python
412
star
5

nnmnkwii

Library to build speech synthesis systems designed for easy and fast prototyping.
Python
382
star
6

tacotron_pytorch

PyTorch implementation of Tacotron speech synthesis model.
Jupyter Notebook
286
star
7

ttslearn

ttslearn: Library for Pythonใงๅญฆใถ้Ÿณๅฃฐๅˆๆˆ (Text-to-speech with Python)
Jupyter Notebook
219
star
8

pylibfreenect2

A python interface for libfreenect2
Python
131
star
9

SPTK

A modified version of Speech Signal Processing Toolkit (SPTK)
C
85
star
10

nnmnkwii_gallery

A collection of examples demonstrating how we can build speech synthesis systems using nnmnkwii.
Jupyter Notebook
70
star
11

gossp

Speech Signal Processing for Go (not maintained)
Go
67
star
12

pyreaper

A python wrapper for REAPER
Cython
64
star
13

sinsy

A fork of sinsy: HMM/DNN-based singing voice synthesis system
C++
57
star
14

pysinsy

Python wrapper for Sinsy
Python
47
star
15

open_jtalk

A fork of open_jtalk
C++
42
star
16

jsut-lab

HTS-style full-context labels for JSUT v1.1
40
star
17

VoiceConversion.jl

[Deprecated] Statistical Voice Conversion in Julia. See the website link for new library
Julia
37
star
18

icassp2020-espnet-tts-merlin-baseline

ICASSP 2020 ESPnet-TTS: Merlin baseline system
Jupyter Notebook
35
star
19

nnet

A small collection of neural network algorithms in Go (no longer maintained)
Go
29
star
20

WORLD.jl

A lightweight julia wrapper for WORLD - a high-quality speech analysis, modification and synthesis system
Julia
27
star
21

MelGeneralizedCepstrums.jl

Mel-Generalized Cepstrum analysis
Julia
19
star
22

nlp100

Assignments for NLP 100
Python
18
star
23

hts_engine_API

A fork of hts_engine_API
C
17
star
24

bayesian-kalmanfilter

Variational Baysian Kalman Filter
Python
16
star
25

WORLD

A modified version of WORLD (original: http://ml.cs.yamanashi.ac.jp/world/english/index.html)
C++
14
star
26

Colaboratory

Colaboratory notebooks
Jupyter Notebook
14
star
27

SynthesisFilters.jl

Speech waveform synthesis filters
Julia
13
star
28

SPTK.jl

A thin Julia wrapper for Speech Signal Processing Toolkit (SPTK) API
Julia
11
star
29

robust_pca

Robust Principal Component Analysis
C++
10
star
30

ConstantQ.jl

A fast constant-q transform in Julia
Julia
9
star
31

demos

Deprecated. See https://github.com/r9y9/website
HTML
6
star
32

naive_bayes

Naive Bayes implementation with digit recognition sample
Python
6
star
33

kiritan_singing_extra

Extra resources derived from https://github.com/mmorise/kiritan_singing for DNN-based singing voice synthesis
6
star
34

stav

Statistical voice conversion written in Go for signal processing backend, Python for model training and parameter conversions
Python
6
star
35

go-world

Go port to WORLD - a high-quality speech analysis, modification and synthesis system.
Go
6
star
36

VCTK-lab

Full context labels for VCTK corpus extracted by Merlin & speech tools
6
star
37

RobustPCA.jl

Robust Principal Component Analysis in Julia
Julia
5
star
38

julia-nmf-ss-toy

NMF-based Music Source Separation Demo in Julia
Julia
5
star
39

REAPER.jl

A Julia interface for REAPER (Robust Epoch And Pitch EstimatoR)
Julia
5
star
40

dotfiles

Dotfiles
Shell
4
star
41

Libfreenect2.jl

A Julia wrapper for libfreenect2
Julia
4
star
42

blog

Deprecated. See https://github.com/r9y9/website instead.
HTML
4
star
43

r9y9.github.io

My website
HTML
4
star
44

BNMF.jl

Bayesian Non-negative Matrix Factorization
Jupyter Notebook
4
star
45

fft

A simple implementation of Fast Fourier Transform (FFT)
C
3
star
46

ita-lab

HTS-style full-context labels for ITAใ‚ณใƒผใƒ‘ใ‚น ใƒžใƒซใƒใƒขใƒผใƒ€ใƒซใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚น
Python
2
star
47

sandbox

2
star
48

media-player-demo

A Media player demonstration using Qt multimedia
C++
2
star
49

docker-pytorch-apex

Docker files for Pytorch + Apex
Dockerfile
2
star
50

SpeechBase.jl

Please do not use this package. SpeechBase.jl still need to be carefully designed.
Julia
2
star
51

FHMMs.jl

proof of concept
Julia
1
star
52

commonvoice-lab

HTS style full-context labels for common voice
1
star
53

setup

Setup script for Linux system
Shell
1
star
54

mnist

Go bindings for MNIST
Go
1
star
55

HMMs.jl

Hidden Markov Models in Julia
Julia
1
star
56

demos-src

Deprecated. See https://github.com/r9y9/website
HTML
1
star
57

pcdio_test

C++
1
star
58

HTSEngineAPI.jl

A Julia wrapper for hts_engine_API
Julia
1
star
59

python-neural-net-toy-codes

Feed forward Neural Networks with XOR and MNIST examples
Python
1
star
60

css10-lab

HTS-style full-context labels for CSS 10 Ja corpus
1
star
61

svdd2024seg

Python
1
star