pyopenjtalk-plus is a Python wrapper for OpenJTalk, a Japanese Text-to-Speech (TTS) system. It enhances the original pyopenjtalk with features like automatic dictionary and voice data downloads, customizable voice presets, and improved phoneme generation. The library is actively maintained, currently at version 0.4.1.post8, with frequent minor updates addressing bug fixes and improvements.
pip install pyopenjtalk-plusVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to generate phonemes and audio from Japanese text using pyopenjtalk-plus. The library automatically handles the download of OpenJTalk dictionaries and voice data on first use, simplifying setup. Audio output is a NumPy array, requiring external libraries like `soundfile` or `pyaudio` for saving or playback.
Ensure stable internet connection and write permissions. If automatic download fails, you may need to manually download and specify the `OPENJTALK_DATA_DIR` environment variable or `data_dir` parameter in function calls.
Install the recommended MeCab binding: `pip install python-mecab-t5m`.
To play audio, use `pyaudio` (e.g., `pip install pyaudio`). To save to a file (like WAV), use `soundfile` (e.g., `pip install soundfile`). Refer to their respective documentation for usage.
Ensure your system has the necessary build tools (e.g., 'Build Tools for Visual Studio' on Windows). Check the `pyopenjtalk` documentation for specific native dependencies.