pyopenjtalk

raw JSON →
0.4.1 verified Mon Apr 27 auth: no python

A Python wrapper for OpenJTalk, a Japanese text-to-speech engine. Current version 0.4.1, requires Python >=3.8 and cmake. Release cadence is irregular; last release was 2025-03-01.

pip install pyopenjtalk
error ModuleNotFoundError: No module named 'pyopenjtalk'
cause Package not installed or installed incorrectly.
fix
Run 'pip install pyopenjtalk'. If on Windows, may need to install Visual C++ Build Tools.
error ImportError: libopenjtalk.so: cannot open shared object file
cause Missing system dependencies or broken installation.
fix
Reinstall: 'pip uninstall pyopenjtalk && pip install pyopenjtalk'. On Linux, ensure build essentials are installed.
error ValueError: numpy.ndarray size changed, may indicate binary incompatibility
cause numpy version mismatch between build and runtime.
fix
Upgrade numpy: 'pip install --upgrade numpy' to at least 1.20.
breaking In v0.3.0, run_frontend behavior changed due to introduction of 'marine' accent model. Output format may differ from v0.2.x.
fix Check the full documentation for new feature structure; verify your parsing code against output.
gotcha Building from source requires cmake. If pip fails to install, install cmake first (e.g., 'apt install cmake' or 'brew install cmake').
fix Ensure cmake is installed and in PATH before 'pip install pyopenjtalk'.
deprecated Legacy API functions like 'pyopenjtalk.run_tts' are removed as of v0.3.4. Use 'pyopenjtalk.synthesize' instead.
fix Replace 'run_tts' with 'synthesize'.

Basic usage: synthesize speech or extract linguistic features from Japanese text.

import pyopenjtalk

# Synthesize speech from text (returns wav as numpy array)
text = "こんにちは"
wav, sr = pyopenjtalk.synthesize(text)

# Or get linguistic features
features = pyopenjtalk.run_frontend(text)
print(features)