pyopenjtalk-plus


Namepyopenjtalk-plus JSON
Version 0.3.4.post10 PyPI version JSON
download
home_pagehttps://github.com/tsukumijima/pyopenjtalk-plus
SummaryA Python wrapper for OpenJTalk with additional improvements
upload_time2024-12-25 00:07:07
maintainerNone
docs_urlNone
authorRyuichi Yamamoto
requires_pythonNone
licenseMIT
keywords openjtalk research
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyopenjtalk-plus

[![PyPI](https://img.shields.io/pypi/v/pyopenjtalk-plus.svg)](https://pypi.python.org/pypi/pyopenjtalk-plus)
[![Python package](https://github.com/tsukumijima/pyopenjtalk-plus/actions/workflows/ci.yml/badge.svg)](https://github.com/tsukumijima/pyopenjtalk-plus/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md)

pyopenjtalk-plus は、各フォークでの改善を一つのコードベースにまとめ、さらなる改善を加えることを目的とした、[pyopenjtalk](https://github.com/r9y9/pyopenjtalk) の派生ライブラリです。

## Changes in this fork

- **パッケージ名を `pyopenjtalk-plus` に変更**
  - ライブラリ名は `pyopenjtalk` から変更されておらず、[pyopenjtalk](https://github.com/r9y9/pyopenjtalk) 本家同様に `import pyopenjtalk` でインポートできる
  - [pyopenjtalk](https://github.com/r9y9/pyopenjtalk) 本家のドロップイン代替として利用できる
- **明示的に Python 3.11 / 3.12 / 3.13 をサポート対象に追加**
  - CI 対象の Python バージョンも 3.11 以降メインに変更した
- **Windows・macOS (x64 / arm64)・Linux すべての事前ビルド済み wheels を PyPI に公開**
  - pyopenjtalk は hts_engine_API・OpenJTalk・Cython に依存しており、ビルド環境の構築難易度が比較的高い
    - 特に Windows においては MSVC のインストールが必要となる
  - 事前ビルド済みの wheels を PyPI に公開することで、ビルド環境のない PC でも簡単にインストール可能にすることを意図している
- **Python 側と Cython 側の両方に型ヒント (Type Hints) を追加**
  - Cython モジュールの型ヒントは [sabonerune/pyopenjtalk (enh/add-stub-files ブランチ)](https://github.com/sabonerune/pyopenjtalk/tree/enh/add-stub-files) での変更を一部改変の上で取り込んだもの
- **Cython を 3.0 系に更新**
  - https://github.com/cython/cython/issues/5982 の通り、Python 3.13 では一部の非推奨 C API が削除されている
  - Cython 0.x 系では Python 3.13 以降のビルドに失敗するため、Cython 3.0 系に更新した
- **numpy 2.x 系に対応**
  - numpy 2.x 系では互換性のない変更が多数行われているが、[公式ドキュメント](https://numpy.org/doc/stable/dev/depending_on_numpy.html#numpy-2-0-specific-advice) によると「numpy 2.x 系でビルドした wheel であれば numpy 1.x 系でも動作する」らしい
    - pyopenjtalk-plus では、numpy 2.x 系でビルドした wheel を公開することで対応した
  - ただし、marine (marine-plus) のコードは numpy 2.x 系との互換性がないため (OverflowError が発生する) 、marine と併用する際は引き続き numpy 1.x 系が必要となる
- **`pyopenjtalk.run_frontend()` 関数に CLI インターフェイスを追加**
  - コマンドライン引数としてテキストを受け取り、そのテキストを処理した結果を標準出力に出力する
  - 実行例: `python -m pyopenjtalk "あらゆる現実を、すべて自分の方へねじ曲げたのだ。"`
- **OpenJTalk 向けシステム辞書を、pyopenjtalk では初回実行時に自動ダウンロードされる [open_jtalk_dic_utf_8-1.11.tar.gz](https://github.com/r9y9/open_jtalk/releases/download/v1.11.1/open_jtalk_dic_utf_8-1.11.tar.gz) から、[独自にカスタマイズした pyopenjtalk-plus 向け辞書](pyopenjtalk/dictionary/) (wheel に同梱) に変更**
  - この辞書は [n5-suzuki/pyopenjtalk](https://github.com/n5-suzuki/pyopenjtalk/tree/develop) に含まれていた [bnken_jdic](https://github.com/n5-suzuki/pyopenjtalk/tree/develop/pyopenjtalk/bnken_jdic) という謎の名前のカスタム辞書をベースに、さらに [jpreprocess/naist-jdic](https://github.com/jpreprocess/naist-jdic) での改良点を取り込んだもの
  - この bnken_jdic は、恐らくは OpenJTalk 標準システム辞書の [mecab-naist-jdic](https://github.com/r9y9/open_jtalk/tree/1.11/src/mecab-naist-jdic) に対し、アクセント・読みの推定精度向上のために大幅にカスタマイズを加えた辞書データと推察される
  - 自然言語処理の専門家ではないため bnken_jdic でどれだけ改善されているかは分からないが、「見るからに相当な手間を掛け、仕様が極めて難解な OpenJTalk 辞書を継続的にカスタマイズできている」時点で少なくとも open_jtalk_dic_utf_8-1.11.tar.gz よりは改善されているだろうと踏み、pyopenjtalk-plus に取り込んだ
  - 一方 [jpreprocess/naist-jdic](https://github.com/jpreprocess/naist-jdic) では open_jtalk_dic_utf_8-1.11.tar.gz (のベースである mecab-naist-jdic) に jpreprocess 向けの改良が施されており、(恐らく手動作成されたと思われる) 辞書データのミスの修正など有用な変更が多かったことから、上記 bnken_jdic 内の naist-jdic.csv に追加反映している
  - pyopenjtalk 本家で実装されていた `_lazy_init()` 関数内での辞書ダウンロード処理は pyopenjtalk-plus での辞書同梱に伴い削除している
    - 辞書データがなければ pyopenjtalk は動作しないため (つまり辞書をダウンロードしない選択肢はなく必須) 、毎回追加でダウンロードするよりも wheel に直接含めた方が安定性の面でよりベターだと考えた
    - pyopenjtalk-plus の辞書データは 100MB 以上あるが (wheel 自体は圧縮が効いて 25MB 程度) 、せいぜい数十 MB のサイズ節約よりもアクセント・読み推定精度の向上を優先した
  - このカスタム辞書は pyproject.toml のあるディレクトリで `task build-dictionary` を実行するとビルドできる
    - 管理の簡便化のため、ビルド済みの辞書データ (*.bin / *.dic) はこの Git リポジトリに含めている 
- **`pyopenjtalk.run_frontend()` や `pyopenjtalk.g2p()` でも `run_marine=True` を指定し [marine](https://github.com/6gsn/marine) による AI アクセント推定を行えるようにした**
  - 以前から `pyopenjtalk.extract_fullcontext()` では marine による AI アクセント推定が可能だったが、`pyopenjtalk.run_frontend()` や `pyopenjtalk.g2p()` にも実装した
  - 具体的にどれだけ良いかは検証できていないが、OpenJTalk のデフォルトのアクセント推定処理のみを使用した場合と比較して、(PyTorch モデルによる推論が入るため若干遅くなるものの) 文章によってはより自然なアクセントを推定できることが期待される
    - ただし必ずしも marine 利用時の方が自然なアクセントにはなるとは限らないようで、軽く試した限りでは固有名詞の多い文章が棒読みになりがちな印象もある
      - もっとも、独自に marine 向けの学習済みモデルを作成した場合はこの限りではない
      - 実際、「デフォルトの学習済みモデルは JSUT コーパスのみから学習されており、論文に記載されている性能とは異なる」(≒ marine 開発元の LINE 社内では独自の音声コーパスを用いてより高性能な学習済みモデルを作成・運用している) 旨が marine の README に記載されている
    - [n5-suzuki/pyopenjtalk](https://github.com/n5-suzuki/pyopenjtalk/tree/develop) では marine がデフォルトの依存関係に追加されており、専ら marine による AI アクセント推定を併用していることが伺える
    - pyopenjtalk-plus では PyTorch への依存が発生することからデフォルトの依存関係には含めていないが、別途 marine / marine-plus をインストールすれば利用可能
  - **⚠️ marine 本家は Windows や Python 3.12 以降に非対応な上、非推奨警告が多数出力される問題があるため、これらの問題に対処した [marine-plus](https://github.com/tsukumijima/marine-plus) の利用を強く推奨します**
    - marine-plus での変更点は https://github.com/tsukumijima/marine-plus/commits/main/ を参照のこと
    - `pip install marine-plus` で marine 本家の代わりに marine-plus をインストールできる
- **[litagin02/pyopenjtalk](https://github.com/litagin02/pyopenjtalk) での変更を取り込み、`pyopenjtalk.unset_user_dict()` 関数を追加**
  - VOICEVOX で利用されている [VOICEVOX/pyopenjtalk](https://github.com/VOICEVOX/pyopenjtalk) には、VOICEVOX ENGINE で利用するためのユーザー辞書機能が独自に追加されている
  - その後 pyopenjtalk v0.3.4 で同等のユーザー辞書機能が実装された
    - VOICEVOX/pyopenjtalk の `set_user_dict()` 関数が `update_global_jtalk_with_user_dict()` 関数になるなど、同等の機能ながら関数名は変更されている
    - …が、どういう訳か VOICEVOX/pyopenjtalk には存在した「設定したユーザー辞書をリセットする」関数が実装されていない
  - このため litagin02/pyopenjtalk では VOICEVOX/pyopenjtalk から `pyopenjtalk.unset_user_dict()` 関数が移植されており、pyopenjtalk-plus でもこの実装を継承した
  - このほか、クロスプラットフォームで wheel をビルドするための GitHub Actions ワークフローもこのフォークから取り込んだもの
- **[VOICEVOX/pyopenjtalk](https://github.com/VOICEVOX/pyopenjtalk) での変更を取り込み、多数の改良点を反映**
  - [OpenJTalk の VOICEVOX 向けフォーク (VOICEVOX/open_jtalk)](https://github.com/VOICEVOX/open_jtalk) での変更内容を前提とした変更が多数含まれる
  - 取り込んだ変更点 (一部):
    - text2mecab() 関数を安全に改良し、エラー発生時に適切な RuntimeError を送出する
    - ARM 版 Windows でビルド可能にする
    - Windows で辞書の保存先パスに日本語を含むマルチバイト文字が含まれるとエラーが発生する問題を修正
    - 各環境でのビルドに関連する諸問題を修正
    - (OpenJTalk 側のみ) OpenJTalk 本体だけでユーザー辞書を読み込める `Mecab_load_with_userdic()` 関数を追加
    - (OpenJTalk 側のみ) 辞書のコンパイルに利用される `mecab-dict-index` モジュールにログ出力を抑制する `--quiet` オプションを追加
    - (OpenJTalk 側のみ) `mecab-dict-index` モジュールの `main()` 関数 (元は CLI コマンド用) をコメントアウト
      - OpenJTalk は MeCab のソースコードがベース、その MeCab 自体も非常にレガシーなソフトウェアで、お世辞にも綺麗なコードではない
      - このためか pyopenjtalk の辞書コンパイル機能は「CLI コマンド `mecab-dict-index` の argv と argc に相当する値を、ライブラリ側から OpenJTalk の `mecab_dict_index()` 関数 (`mecab-dict-index` コマンドのエントリーポイント) の引数として注入する」という非常にトリッキーかつ強引な手法で実装されている
      - どのみち pyopenjtalk 向け OpenJTalk では `mecab-dict-index` コマンドをビルドする必要がない
- **[n5-suzuki/pyopenjtalk](https://github.com/n5-suzuki/pyopenjtalk/tree/develop) での変更を取り込み、日本語アクセント・読み推定精度を改善**
  - [n5-suzuki/pyopenjtalk](https://github.com/n5-suzuki/pyopenjtalk/tree/develop) では、カスタム辞書 (bnken_jdic) の追加に加え pyopenjtalk・OpenJTalk 本体もより自然な日本語アクセント・読みを推定できるよう大幅に改良されている
  - 特に複数の読み方をする漢字の読みに対し [sudachipy](https://github.com/WorksApplications/SudachiPy) で形態素解析を行い、得られた結果を使い OpenJTalk から返された `list[NJDFeature]` 内の値を補正している点がユニーク
  - 他にも日本語アクセント・読みの推定精度向上のための涙ぐましい努力の結晶が多く反映されており、有用性を鑑みほぼそのままマージした
    - n5-suzuki 氏、a-ejiri 氏に深く感謝いたします🙏
  - **このほか「何」を「なん」と読むか「なに」と読むかを判定するための [scikit-learn で実装された機械学習モデルによるロジック](pyopenjtalk/yomi_model/nani_predict.py) も含まれていたため、学習済みモデルを ONNX に変換して scikit-learn 0.24.2 への依存なしに動かせるよう改良した**
    - 当該モデルは scikit-learn 0.24.2 でしか動作しないが、3年以上前にリリースされた極めて古いバージョンにつき Python 3.11 以降では動作せず、依存関係の問題もありインストール自体が困難になってきている
    - 学習用コードは含まれていなかったため推測するしかないが、モデルのバイナリに含まれる文字列から、RandomForestClassifier を用いた比較的単純な機械学習モデルだと推測される
    - [ONNX 変換ツール](pyopenjtalk/yomi_model/convert_onnx.py) を自作した上で ONNX に変換し、[推論コード](pyopenjtalk/yomi_model/nani_predict.py) も ONNXRuntime を用いて推論するよう変更した
      - この変更により依存関係に ONNXRuntime が追加されるが、すでに機械学習関連の他ライブラリの依存関係に含まれていることも多く、実用上問題ないと判断した
- **[korguchi/pyopenjtalk](https://github.com/korguchi/pyopenjtalk) での変更を取り込み、日本語の読み推定精度を改善**
  - このフォークで利用されている [korguchi/open_jtalk](https://github.com/korguchi/open_jtalk) では、「クァ」や「クヮ」などの比較的珍しい音素のサポートが追加されている
  - ほかにも「!」(感嘆符)を「記号/一般」として正しく推定するための改良など、概ね副作用なしに精度向上が見込めることから、有用性を鑑みほぼそのままマージした
- **[sabonerune/pyopenjtalk](https://github.com/sabonerune/pyopenjtalk) での変更を取り込み、スレッドセーフ化と一部 Cython コードの nogil 化を達成**
  - スレッドセーフ化により、複数スレッドから安全に pyopenjtalk を呼び出せるようになった
  - 一部 Cython コードの nogil 化により、若干のパフォーマンス向上も見込める
  - https://github.com/r9y9/pyopenjtalk/pull/87 と https://github.com/r9y9/pyopenjtalk/pull/88 の内容を一部改変の上で取り込んだ
- **submodule の OpenJTalk を [tsukumijima/open_jtalk](https://github.com/tsukumijima/open_jtalk) に変更**
  - このフォークでは、pyopenjtalk-plus 向けに下記のフォーク版 OpenJTalk での改善内容を取り込んでいる
    - [VOICEVOX/open_jtalk](https://github.com/VOICEVOX/open_jtalk)
    - [a-ejiri/open_jtalk](https://github.com/a-ejiri/open_jtalk)
    - [sophiefy/open_jtalk](https://github.com/sophiefy/open_jtalk)
    - [korguchi/open_jtalk](https://github.com/korguchi/open_jtalk)
- **submodule の hts_engine_API を [syoyo/hts_engine_API](https://github.com/syoyo/hts_engine_API) に変更**
  - このフォークでは、https://github.com/r9y9/hts_engine_API/issues/9 に挙げられている問題が修正されている
- **ライブラリの開発環境構築・ビルド・コード整形・テストを `taskipy` によるタスクランナーでの管理に変更**
- **利用予定のない Travis CI 向けファイルを削除**
- **不要な依存関係の削除、依存バージョンの整理**
- **その他コードのクリーンアップ、非推奨警告の解消など**

## Installation

下記コマンドを実行して、ライブラリをインストールできます。

```bash
pip install pyopenjtalk-plus
```

## Development

開発環境は macOS / Linux 、Python バージョンは 3.11 が前提です。

```bash
# submodule ごとリポジトリを clone
git clone --recursive https://github.com/tsukumijima/pyopenjtalk-plus.git
cd pyopenjtalk-plus

# ライブラリ自身とその依存関係を .venv/ 以下の仮想環境にインストールし、開発環境を構築
pip install taskipy
task install

# コード整形
task lint
task format

# テストの実行
task test

# pyopenjtalk/dictionary/ 以下にある MeCab / OpenJTalk 辞書をビルド
## ビルド成果物は同ディレクトリに *.bin / *.dic として出力される
## ビルド後の辞書データは数百 MB あるバイナリファイルだが、取り回しやすいよう敢えて Git 管理下に含めている
task build-dictionary

# ライブラリの wheel と sdist をビルドし、dist/ に出力
task build

# ビルド成果物をクリーンアップ
task clean
```

下記ならびに [docs/](docs/) 以下のドキュメントは、[pyopenjtalk](https://github.com/r9y9/pyopenjtalk) 本家のドキュメントを改変なしでそのまま引き継いでいます。  
これらのドキュメントの内容が pyopenjtalk-plus にも通用するかは保証されません。

-------

# pyopenjtalk

[![PyPI](https://img.shields.io/pypi/v/pyopenjtalk.svg)](https://pypi.python.org/pypi/pyopenjtalk)
[![Python package](https://github.com/r9y9/pyopenjtalk/actions/workflows/ci.yaml/badge.svg)](https://github.com/r9y9/pyopenjtalk/actions/workflows/ci.yaml)
[![Build Status](https://app.travis-ci.com/r9y9/pyopenjtalk.svg?branch=master)](https://app.travis-ci.com/r9y9/pyopenjtalk)
[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md)
[![DOI](https://zenodo.org/badge/143748865.svg)](https://zenodo.org/badge/latestdoi/143748865)

A python wrapper for [OpenJTalk](http://open-jtalk.sp.nitech.ac.jp/).

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](https://github.com/r9y9/open_jtalk). 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](https://github.com/r9y9/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](https://github.com/r9y9/pyopenjtalk/pull/13))

## 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)](https://nbviewer.jupyter.org/github/r9y9/pyopenjtalk/blob/master/docs/notebooks/Demo.ipynb).

### TTS

```py
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

```py
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/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',
'sil^k-o+N=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/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',
'k^o-N+n=i/A:-3+2+4/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',
'o^N-n+i=ch/A:-2+3+3/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',
'N^n-i+ch=i/A:-2+3+3/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',
'n^i-ch+i=w/A:-1+4+2/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',
'i^ch-i+w=a/A:-1+4+2/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',
'ch^i-w+a=sil/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',
'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](http://hts.sp.nitech.ac.jp/archives/2.3/HTS-demo_NIT-ATR503-M001.tar.bz2) for more details about full-context labels.


### Grapheme-to-phoeneme (G2P)

```py
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]: 'コンニチワ'
```

### Create/Apply user dictionary

1. Create a CSV file (e.g. `user.csv`) and write custom words like below:

```csv
GNU,,,1,名詞,一般,*,*,*,*,GNU,グヌー,グヌー,2/3,*
```

2. Call `mecab_dict_index` to compile the CSV file.

```python
In [1]: import pyopenjtalk

In [2]: pyopenjtalk.mecab_dict_index("user.csv", "user.dic")
reading user.csv ... 1
emitting double-array: 100% |###########################################|

done!
```

3. Call `update_global_jtalk_with_user_dict` to apply the user dictionary.

```python
In [3]: pyopenjtalk.g2p("GNU")
Out[3]: 'j i i e n u y u u'

In [4]: pyopenjtalk.update_global_jtalk_with_user_dict("user.dic")

In [5]: pyopenjtalk.g2p("GNU")
Out[5]: 'g u n u u'
```

### 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](https://github.com/6gsn/marine)). If you want to use the feature, please install pyopenjtalk as below;

```shell
pip install pyopenjtalk[marine]
```

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

```python
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

- pyopenjtalk: MIT license ([LICENSE.md](LICENSE.md))
- Open JTalk: Modified BSD license ([COPYING](https://github.com/r9y9/open_jtalk/blob/1.10/src/COPYING))
- htsvoice in this repository: Please check [pyopenjtalk/htsvoice/README.md](pyopenjtalk/htsvoice/README.md).
- marine: Apache 2.0 license ([LICENSE](https://github.com/6gsn/marine/blob/main/LICENSE))

## Acknowledgements

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tsukumijima/pyopenjtalk-plus",
    "name": "pyopenjtalk-plus",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "OpenJTalk, Research",
    "author": "Ryuichi Yamamoto",
    "author_email": "zryuichi@gmail.com",
    "download_url": null,
    "platform": null,
    "description": "# pyopenjtalk-plus\n\n[![PyPI](https://img.shields.io/pypi/v/pyopenjtalk-plus.svg)](https://pypi.python.org/pypi/pyopenjtalk-plus)\n[![Python package](https://github.com/tsukumijima/pyopenjtalk-plus/actions/workflows/ci.yml/badge.svg)](https://github.com/tsukumijima/pyopenjtalk-plus/actions/workflows/ci.yml)\n[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md)\n\npyopenjtalk-plus \u306f\u3001\u5404\u30d5\u30a9\u30fc\u30af\u3067\u306e\u6539\u5584\u3092\u4e00\u3064\u306e\u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u306b\u307e\u3068\u3081\u3001\u3055\u3089\u306a\u308b\u6539\u5584\u3092\u52a0\u3048\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u305f\u3001[pyopenjtalk](https://github.com/r9y9/pyopenjtalk) \u306e\u6d3e\u751f\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002\n\n## Changes in this fork\n\n- **\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u3092 `pyopenjtalk-plus` \u306b\u5909\u66f4**\n  - \u30e9\u30a4\u30d6\u30e9\u30ea\u540d\u306f `pyopenjtalk` \u304b\u3089\u5909\u66f4\u3055\u308c\u3066\u304a\u3089\u305a\u3001[pyopenjtalk](https://github.com/r9y9/pyopenjtalk) \u672c\u5bb6\u540c\u69d8\u306b `import pyopenjtalk` \u3067\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u304d\u308b\n  - [pyopenjtalk](https://github.com/r9y9/pyopenjtalk) \u672c\u5bb6\u306e\u30c9\u30ed\u30c3\u30d7\u30a4\u30f3\u4ee3\u66ff\u3068\u3057\u3066\u5229\u7528\u3067\u304d\u308b\n- **\u660e\u793a\u7684\u306b Python 3.11 / 3.12 / 3.13 \u3092\u30b5\u30dd\u30fc\u30c8\u5bfe\u8c61\u306b\u8ffd\u52a0**\n  - CI \u5bfe\u8c61\u306e Python \u30d0\u30fc\u30b8\u30e7\u30f3\u3082 3.11 \u4ee5\u964d\u30e1\u30a4\u30f3\u306b\u5909\u66f4\u3057\u305f\n- **Windows\u30fbmacOS (x64 / arm64)\u30fbLinux \u3059\u3079\u3066\u306e\u4e8b\u524d\u30d3\u30eb\u30c9\u6e08\u307f wheels \u3092 PyPI \u306b\u516c\u958b**\n  - pyopenjtalk \u306f hts_engine_API\u30fbOpenJTalk\u30fbCython \u306b\u4f9d\u5b58\u3057\u3066\u304a\u308a\u3001\u30d3\u30eb\u30c9\u74b0\u5883\u306e\u69cb\u7bc9\u96e3\u6613\u5ea6\u304c\u6bd4\u8f03\u7684\u9ad8\u3044\n    - \u7279\u306b Windows \u306b\u304a\u3044\u3066\u306f MSVC \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3068\u306a\u308b\n  - \u4e8b\u524d\u30d3\u30eb\u30c9\u6e08\u307f\u306e wheels \u3092 PyPI \u306b\u516c\u958b\u3059\u308b\u3053\u3068\u3067\u3001\u30d3\u30eb\u30c9\u74b0\u5883\u306e\u306a\u3044 PC \u3067\u3082\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u53ef\u80fd\u306b\u3059\u308b\u3053\u3068\u3092\u610f\u56f3\u3057\u3066\u3044\u308b\n- **Python \u5074\u3068 Cython \u5074\u306e\u4e21\u65b9\u306b\u578b\u30d2\u30f3\u30c8 (Type Hints) \u3092\u8ffd\u52a0**\n  - Cython \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u578b\u30d2\u30f3\u30c8\u306f [sabonerune/pyopenjtalk (enh/add-stub-files \u30d6\u30e9\u30f3\u30c1)](https://github.com/sabonerune/pyopenjtalk/tree/enh/add-stub-files) \u3067\u306e\u5909\u66f4\u3092\u4e00\u90e8\u6539\u5909\u306e\u4e0a\u3067\u53d6\u308a\u8fbc\u3093\u3060\u3082\u306e\n- **Cython \u3092 3.0 \u7cfb\u306b\u66f4\u65b0**\n  - https://github.com/cython/cython/issues/5982 \u306e\u901a\u308a\u3001Python 3.13 \u3067\u306f\u4e00\u90e8\u306e\u975e\u63a8\u5968 C API \u304c\u524a\u9664\u3055\u308c\u3066\u3044\u308b\n  - Cython 0.x \u7cfb\u3067\u306f Python 3.13 \u4ee5\u964d\u306e\u30d3\u30eb\u30c9\u306b\u5931\u6557\u3059\u308b\u305f\u3081\u3001Cython 3.0 \u7cfb\u306b\u66f4\u65b0\u3057\u305f\n- **numpy 2.x \u7cfb\u306b\u5bfe\u5fdc**\n  - numpy 2.x \u7cfb\u3067\u306f\u4e92\u63db\u6027\u306e\u306a\u3044\u5909\u66f4\u304c\u591a\u6570\u884c\u308f\u308c\u3066\u3044\u308b\u304c\u3001[\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8](https://numpy.org/doc/stable/dev/depending_on_numpy.html#numpy-2-0-specific-advice) \u306b\u3088\u308b\u3068\u300cnumpy 2.x \u7cfb\u3067\u30d3\u30eb\u30c9\u3057\u305f wheel \u3067\u3042\u308c\u3070 numpy 1.x \u7cfb\u3067\u3082\u52d5\u4f5c\u3059\u308b\u300d\u3089\u3057\u3044\n    - pyopenjtalk-plus \u3067\u306f\u3001numpy 2.x \u7cfb\u3067\u30d3\u30eb\u30c9\u3057\u305f wheel \u3092\u516c\u958b\u3059\u308b\u3053\u3068\u3067\u5bfe\u5fdc\u3057\u305f\n  - \u305f\u3060\u3057\u3001marine (marine-plus) \u306e\u30b3\u30fc\u30c9\u306f numpy 2.x \u7cfb\u3068\u306e\u4e92\u63db\u6027\u304c\u306a\u3044\u305f\u3081 (OverflowError \u304c\u767a\u751f\u3059\u308b) \u3001marine \u3068\u4f75\u7528\u3059\u308b\u969b\u306f\u5f15\u304d\u7d9a\u304d numpy 1.x \u7cfb\u304c\u5fc5\u8981\u3068\u306a\u308b\n- **`pyopenjtalk.run_frontend()` \u95a2\u6570\u306b CLI \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u8ffd\u52a0**\n  - \u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u5f15\u6570\u3068\u3057\u3066\u30c6\u30ad\u30b9\u30c8\u3092\u53d7\u3051\u53d6\u308a\u3001\u305d\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u51e6\u7406\u3057\u305f\u7d50\u679c\u3092\u6a19\u6e96\u51fa\u529b\u306b\u51fa\u529b\u3059\u308b\n  - \u5b9f\u884c\u4f8b: `python -m pyopenjtalk \"\u3042\u3089\u3086\u308b\u73fe\u5b9f\u3092\u3001\u3059\u3079\u3066\u81ea\u5206\u306e\u65b9\u3078\u306d\u3058\u66f2\u3052\u305f\u306e\u3060\u3002\"`\n- **OpenJTalk \u5411\u3051\u30b7\u30b9\u30c6\u30e0\u8f9e\u66f8\u3092\u3001pyopenjtalk \u3067\u306f\u521d\u56de\u5b9f\u884c\u6642\u306b\u81ea\u52d5\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u308b [open_jtalk_dic_utf_8-1.11.tar.gz](https://github.com/r9y9/open_jtalk/releases/download/v1.11.1/open_jtalk_dic_utf_8-1.11.tar.gz) \u304b\u3089\u3001[\u72ec\u81ea\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f pyopenjtalk-plus \u5411\u3051\u8f9e\u66f8](pyopenjtalk/dictionary/) (wheel \u306b\u540c\u68b1) \u306b\u5909\u66f4**\n  - \u3053\u306e\u8f9e\u66f8\u306f [n5-suzuki/pyopenjtalk](https://github.com/n5-suzuki/pyopenjtalk/tree/develop) \u306b\u542b\u307e\u308c\u3066\u3044\u305f [bnken_jdic](https://github.com/n5-suzuki/pyopenjtalk/tree/develop/pyopenjtalk/bnken_jdic) \u3068\u3044\u3046\u8b0e\u306e\u540d\u524d\u306e\u30ab\u30b9\u30bf\u30e0\u8f9e\u66f8\u3092\u30d9\u30fc\u30b9\u306b\u3001\u3055\u3089\u306b [jpreprocess/naist-jdic](https://github.com/jpreprocess/naist-jdic) \u3067\u306e\u6539\u826f\u70b9\u3092\u53d6\u308a\u8fbc\u3093\u3060\u3082\u306e\n  - \u3053\u306e bnken_jdic \u306f\u3001\u6050\u3089\u304f\u306f OpenJTalk \u6a19\u6e96\u30b7\u30b9\u30c6\u30e0\u8f9e\u66f8\u306e [mecab-naist-jdic](https://github.com/r9y9/open_jtalk/tree/1.11/src/mecab-naist-jdic) \u306b\u5bfe\u3057\u3001\u30a2\u30af\u30bb\u30f3\u30c8\u30fb\u8aad\u307f\u306e\u63a8\u5b9a\u7cbe\u5ea6\u5411\u4e0a\u306e\u305f\u3081\u306b\u5927\u5e45\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3092\u52a0\u3048\u305f\u8f9e\u66f8\u30c7\u30fc\u30bf\u3068\u63a8\u5bdf\u3055\u308c\u308b\n  - \u81ea\u7136\u8a00\u8a9e\u51e6\u7406\u306e\u5c02\u9580\u5bb6\u3067\u306f\u306a\u3044\u305f\u3081 bnken_jdic \u3067\u3069\u308c\u3060\u3051\u6539\u5584\u3055\u308c\u3066\u3044\u308b\u304b\u306f\u5206\u304b\u3089\u306a\u3044\u304c\u3001\u300c\u898b\u308b\u304b\u3089\u306b\u76f8\u5f53\u306a\u624b\u9593\u3092\u639b\u3051\u3001\u4ed5\u69d8\u304c\u6975\u3081\u3066\u96e3\u89e3\u306a OpenJTalk \u8f9e\u66f8\u3092\u7d99\u7d9a\u7684\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u3066\u3044\u308b\u300d\u6642\u70b9\u3067\u5c11\u306a\u304f\u3068\u3082 open_jtalk_dic_utf_8-1.11.tar.gz \u3088\u308a\u306f\u6539\u5584\u3055\u308c\u3066\u3044\u308b\u3060\u308d\u3046\u3068\u8e0f\u307f\u3001pyopenjtalk-plus \u306b\u53d6\u308a\u8fbc\u3093\u3060\n  - \u4e00\u65b9 [jpreprocess/naist-jdic](https://github.com/jpreprocess/naist-jdic) \u3067\u306f open_jtalk_dic_utf_8-1.11.tar.gz (\u306e\u30d9\u30fc\u30b9\u3067\u3042\u308b mecab-naist-jdic) \u306b jpreprocess \u5411\u3051\u306e\u6539\u826f\u304c\u65bd\u3055\u308c\u3066\u304a\u308a\u3001(\u6050\u3089\u304f\u624b\u52d5\u4f5c\u6210\u3055\u308c\u305f\u3068\u601d\u308f\u308c\u308b) \u8f9e\u66f8\u30c7\u30fc\u30bf\u306e\u30df\u30b9\u306e\u4fee\u6b63\u306a\u3069\u6709\u7528\u306a\u5909\u66f4\u304c\u591a\u304b\u3063\u305f\u3053\u3068\u304b\u3089\u3001\u4e0a\u8a18 bnken_jdic \u5185\u306e naist-jdic.csv \u306b\u8ffd\u52a0\u53cd\u6620\u3057\u3066\u3044\u308b\n  - pyopenjtalk \u672c\u5bb6\u3067\u5b9f\u88c5\u3055\u308c\u3066\u3044\u305f `_lazy_init()` \u95a2\u6570\u5185\u3067\u306e\u8f9e\u66f8\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u51e6\u7406\u306f pyopenjtalk-plus \u3067\u306e\u8f9e\u66f8\u540c\u68b1\u306b\u4f34\u3044\u524a\u9664\u3057\u3066\u3044\u308b\n    - \u8f9e\u66f8\u30c7\u30fc\u30bf\u304c\u306a\u3051\u308c\u3070 pyopenjtalk \u306f\u52d5\u4f5c\u3057\u306a\u3044\u305f\u3081 (\u3064\u307e\u308a\u8f9e\u66f8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u306a\u3044\u9078\u629e\u80a2\u306f\u306a\u304f\u5fc5\u9808) \u3001\u6bce\u56de\u8ffd\u52a0\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3088\u308a\u3082 wheel \u306b\u76f4\u63a5\u542b\u3081\u305f\u65b9\u304c\u5b89\u5b9a\u6027\u306e\u9762\u3067\u3088\u308a\u30d9\u30bf\u30fc\u3060\u3068\u8003\u3048\u305f\n    - pyopenjtalk-plus \u306e\u8f9e\u66f8\u30c7\u30fc\u30bf\u306f 100MB \u4ee5\u4e0a\u3042\u308b\u304c (wheel \u81ea\u4f53\u306f\u5727\u7e2e\u304c\u52b9\u3044\u3066 25MB \u7a0b\u5ea6) \u3001\u305b\u3044\u305c\u3044\u6570\u5341 MB \u306e\u30b5\u30a4\u30ba\u7bc0\u7d04\u3088\u308a\u3082\u30a2\u30af\u30bb\u30f3\u30c8\u30fb\u8aad\u307f\u63a8\u5b9a\u7cbe\u5ea6\u306e\u5411\u4e0a\u3092\u512a\u5148\u3057\u305f\n  - \u3053\u306e\u30ab\u30b9\u30bf\u30e0\u8f9e\u66f8\u306f pyproject.toml \u306e\u3042\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067 `task build-dictionary` \u3092\u5b9f\u884c\u3059\u308b\u3068\u30d3\u30eb\u30c9\u3067\u304d\u308b\n    - \u7ba1\u7406\u306e\u7c21\u4fbf\u5316\u306e\u305f\u3081\u3001\u30d3\u30eb\u30c9\u6e08\u307f\u306e\u8f9e\u66f8\u30c7\u30fc\u30bf (*.bin / *.dic) \u306f\u3053\u306e Git \u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u542b\u3081\u3066\u3044\u308b \n- **`pyopenjtalk.run_frontend()` \u3084 `pyopenjtalk.g2p()` \u3067\u3082 `run_marine=True` \u3092\u6307\u5b9a\u3057 [marine](https://github.com/6gsn/marine) \u306b\u3088\u308b AI \u30a2\u30af\u30bb\u30f3\u30c8\u63a8\u5b9a\u3092\u884c\u3048\u308b\u3088\u3046\u306b\u3057\u305f**\n  - \u4ee5\u524d\u304b\u3089 `pyopenjtalk.extract_fullcontext()` \u3067\u306f marine \u306b\u3088\u308b AI \u30a2\u30af\u30bb\u30f3\u30c8\u63a8\u5b9a\u304c\u53ef\u80fd\u3060\u3063\u305f\u304c\u3001`pyopenjtalk.run_frontend()` \u3084 `pyopenjtalk.g2p()` \u306b\u3082\u5b9f\u88c5\u3057\u305f\n  - \u5177\u4f53\u7684\u306b\u3069\u308c\u3060\u3051\u826f\u3044\u304b\u306f\u691c\u8a3c\u3067\u304d\u3066\u3044\u306a\u3044\u304c\u3001OpenJTalk \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30a2\u30af\u30bb\u30f3\u30c8\u63a8\u5b9a\u51e6\u7406\u306e\u307f\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u3068\u6bd4\u8f03\u3057\u3066\u3001(PyTorch \u30e2\u30c7\u30eb\u306b\u3088\u308b\u63a8\u8ad6\u304c\u5165\u308b\u305f\u3081\u82e5\u5e72\u9045\u304f\u306a\u308b\u3082\u306e\u306e) \u6587\u7ae0\u306b\u3088\u3063\u3066\u306f\u3088\u308a\u81ea\u7136\u306a\u30a2\u30af\u30bb\u30f3\u30c8\u3092\u63a8\u5b9a\u3067\u304d\u308b\u3053\u3068\u304c\u671f\u5f85\u3055\u308c\u308b\n    - \u305f\u3060\u3057\u5fc5\u305a\u3057\u3082 marine \u5229\u7528\u6642\u306e\u65b9\u304c\u81ea\u7136\u306a\u30a2\u30af\u30bb\u30f3\u30c8\u306b\u306f\u306a\u308b\u3068\u306f\u9650\u3089\u306a\u3044\u3088\u3046\u3067\u3001\u8efd\u304f\u8a66\u3057\u305f\u9650\u308a\u3067\u306f\u56fa\u6709\u540d\u8a5e\u306e\u591a\u3044\u6587\u7ae0\u304c\u68d2\u8aad\u307f\u306b\u306a\u308a\u304c\u3061\u306a\u5370\u8c61\u3082\u3042\u308b\n      - \u3082\u3063\u3068\u3082\u3001\u72ec\u81ea\u306b marine \u5411\u3051\u306e\u5b66\u7fd2\u6e08\u307f\u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u3057\u305f\u5834\u5408\u306f\u3053\u306e\u9650\u308a\u3067\u306f\u306a\u3044\n      - \u5b9f\u969b\u3001\u300c\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u5b66\u7fd2\u6e08\u307f\u30e2\u30c7\u30eb\u306f JSUT \u30b3\u30fc\u30d1\u30b9\u306e\u307f\u304b\u3089\u5b66\u7fd2\u3055\u308c\u3066\u304a\u308a\u3001\u8ad6\u6587\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u6027\u80fd\u3068\u306f\u7570\u306a\u308b\u300d(\u2252 marine \u958b\u767a\u5143\u306e LINE \u793e\u5185\u3067\u306f\u72ec\u81ea\u306e\u97f3\u58f0\u30b3\u30fc\u30d1\u30b9\u3092\u7528\u3044\u3066\u3088\u308a\u9ad8\u6027\u80fd\u306a\u5b66\u7fd2\u6e08\u307f\u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u30fb\u904b\u7528\u3057\u3066\u3044\u308b) \u65e8\u304c marine \u306e README \u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\n    - [n5-suzuki/pyopenjtalk](https://github.com/n5-suzuki/pyopenjtalk/tree/develop) \u3067\u306f marine \u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u4f9d\u5b58\u95a2\u4fc2\u306b\u8ffd\u52a0\u3055\u308c\u3066\u304a\u308a\u3001\u5c02\u3089 marine \u306b\u3088\u308b AI \u30a2\u30af\u30bb\u30f3\u30c8\u63a8\u5b9a\u3092\u4f75\u7528\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u4f3a\u3048\u308b\n    - pyopenjtalk-plus \u3067\u306f PyTorch \u3078\u306e\u4f9d\u5b58\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u304b\u3089\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u4f9d\u5b58\u95a2\u4fc2\u306b\u306f\u542b\u3081\u3066\u3044\u306a\u3044\u304c\u3001\u5225\u9014 marine / marine-plus \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308c\u3070\u5229\u7528\u53ef\u80fd\n  - **\u26a0\ufe0f marine \u672c\u5bb6\u306f Windows \u3084 Python 3.12 \u4ee5\u964d\u306b\u975e\u5bfe\u5fdc\u306a\u4e0a\u3001\u975e\u63a8\u5968\u8b66\u544a\u304c\u591a\u6570\u51fa\u529b\u3055\u308c\u308b\u554f\u984c\u304c\u3042\u308b\u305f\u3081\u3001\u3053\u308c\u3089\u306e\u554f\u984c\u306b\u5bfe\u51e6\u3057\u305f [marine-plus](https://github.com/tsukumijima/marine-plus) \u306e\u5229\u7528\u3092\u5f37\u304f\u63a8\u5968\u3057\u307e\u3059**\n    - marine-plus \u3067\u306e\u5909\u66f4\u70b9\u306f https://github.com/tsukumijima/marine-plus/commits/main/ \u3092\u53c2\u7167\u306e\u3053\u3068\n    - `pip install marine-plus` \u3067 marine \u672c\u5bb6\u306e\u4ee3\u308f\u308a\u306b marine-plus \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\n- **[litagin02/pyopenjtalk](https://github.com/litagin02/pyopenjtalk) \u3067\u306e\u5909\u66f4\u3092\u53d6\u308a\u8fbc\u307f\u3001`pyopenjtalk.unset_user_dict()` \u95a2\u6570\u3092\u8ffd\u52a0**\n  - VOICEVOX \u3067\u5229\u7528\u3055\u308c\u3066\u3044\u308b [VOICEVOX/pyopenjtalk](https://github.com/VOICEVOX/pyopenjtalk) \u306b\u306f\u3001VOICEVOX ENGINE \u3067\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u6a5f\u80fd\u304c\u72ec\u81ea\u306b\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308b\n  - \u305d\u306e\u5f8c pyopenjtalk v0.3.4 \u3067\u540c\u7b49\u306e\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u6a5f\u80fd\u304c\u5b9f\u88c5\u3055\u308c\u305f\n    - VOICEVOX/pyopenjtalk \u306e `set_user_dict()` \u95a2\u6570\u304c `update_global_jtalk_with_user_dict()` \u95a2\u6570\u306b\u306a\u308b\u306a\u3069\u3001\u540c\u7b49\u306e\u6a5f\u80fd\u306a\u304c\u3089\u95a2\u6570\u540d\u306f\u5909\u66f4\u3055\u308c\u3066\u3044\u308b\n    - \u2026\u304c\u3001\u3069\u3046\u3044\u3046\u8a33\u304b VOICEVOX/pyopenjtalk \u306b\u306f\u5b58\u5728\u3057\u305f\u300c\u8a2d\u5b9a\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u3092\u30ea\u30bb\u30c3\u30c8\u3059\u308b\u300d\u95a2\u6570\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u306a\u3044\n  - \u3053\u306e\u305f\u3081 litagin02/pyopenjtalk \u3067\u306f VOICEVOX/pyopenjtalk \u304b\u3089 `pyopenjtalk.unset_user_dict()` \u95a2\u6570\u304c\u79fb\u690d\u3055\u308c\u3066\u304a\u308a\u3001pyopenjtalk-plus \u3067\u3082\u3053\u306e\u5b9f\u88c5\u3092\u7d99\u627f\u3057\u305f\n  - \u3053\u306e\u307b\u304b\u3001\u30af\u30ed\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067 wheel \u3092\u30d3\u30eb\u30c9\u3059\u308b\u305f\u3081\u306e GitHub Actions \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3082\u3053\u306e\u30d5\u30a9\u30fc\u30af\u304b\u3089\u53d6\u308a\u8fbc\u3093\u3060\u3082\u306e\n- **[VOICEVOX/pyopenjtalk](https://github.com/VOICEVOX/pyopenjtalk) \u3067\u306e\u5909\u66f4\u3092\u53d6\u308a\u8fbc\u307f\u3001\u591a\u6570\u306e\u6539\u826f\u70b9\u3092\u53cd\u6620**\n  - [OpenJTalk \u306e VOICEVOX \u5411\u3051\u30d5\u30a9\u30fc\u30af (VOICEVOX/open_jtalk)](https://github.com/VOICEVOX/open_jtalk) \u3067\u306e\u5909\u66f4\u5185\u5bb9\u3092\u524d\u63d0\u3068\u3057\u305f\u5909\u66f4\u304c\u591a\u6570\u542b\u307e\u308c\u308b\n  - \u53d6\u308a\u8fbc\u3093\u3060\u5909\u66f4\u70b9 (\u4e00\u90e8):\n    - text2mecab() \u95a2\u6570\u3092\u5b89\u5168\u306b\u6539\u826f\u3057\u3001\u30a8\u30e9\u30fc\u767a\u751f\u6642\u306b\u9069\u5207\u306a RuntimeError \u3092\u9001\u51fa\u3059\u308b\n    - ARM \u7248 Windows \u3067\u30d3\u30eb\u30c9\u53ef\u80fd\u306b\u3059\u308b\n    - Windows \u3067\u8f9e\u66f8\u306e\u4fdd\u5b58\u5148\u30d1\u30b9\u306b\u65e5\u672c\u8a9e\u3092\u542b\u3080\u30de\u30eb\u30c1\u30d0\u30a4\u30c8\u6587\u5b57\u304c\u542b\u307e\u308c\u308b\u3068\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u554f\u984c\u3092\u4fee\u6b63\n    - \u5404\u74b0\u5883\u3067\u306e\u30d3\u30eb\u30c9\u306b\u95a2\u9023\u3059\u308b\u8af8\u554f\u984c\u3092\u4fee\u6b63\n    - (OpenJTalk \u5074\u306e\u307f) OpenJTalk \u672c\u4f53\u3060\u3051\u3067\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u3092\u8aad\u307f\u8fbc\u3081\u308b `Mecab_load_with_userdic()` \u95a2\u6570\u3092\u8ffd\u52a0\n    - (OpenJTalk \u5074\u306e\u307f) \u8f9e\u66f8\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u306b\u5229\u7528\u3055\u308c\u308b `mecab-dict-index` \u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u30ed\u30b0\u51fa\u529b\u3092\u6291\u5236\u3059\u308b `--quiet` \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\n    - (OpenJTalk \u5074\u306e\u307f) `mecab-dict-index` \u30e2\u30b8\u30e5\u30fc\u30eb\u306e `main()` \u95a2\u6570 (\u5143\u306f CLI \u30b3\u30de\u30f3\u30c9\u7528) \u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\n      - OpenJTalk \u306f MeCab \u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304c\u30d9\u30fc\u30b9\u3001\u305d\u306e MeCab \u81ea\u4f53\u3082\u975e\u5e38\u306b\u30ec\u30ac\u30b7\u30fc\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3001\u304a\u4e16\u8f9e\u306b\u3082\u7dba\u9e97\u306a\u30b3\u30fc\u30c9\u3067\u306f\u306a\u3044\n      - \u3053\u306e\u305f\u3081\u304b pyopenjtalk \u306e\u8f9e\u66f8\u30b3\u30f3\u30d1\u30a4\u30eb\u6a5f\u80fd\u306f\u300cCLI \u30b3\u30de\u30f3\u30c9 `mecab-dict-index` \u306e argv \u3068 argc \u306b\u76f8\u5f53\u3059\u308b\u5024\u3092\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u5074\u304b\u3089 OpenJTalk \u306e `mecab_dict_index()` \u95a2\u6570 (`mecab-dict-index` \u30b3\u30de\u30f3\u30c9\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u30dd\u30a4\u30f3\u30c8) \u306e\u5f15\u6570\u3068\u3057\u3066\u6ce8\u5165\u3059\u308b\u300d\u3068\u3044\u3046\u975e\u5e38\u306b\u30c8\u30ea\u30c3\u30ad\u30fc\u304b\u3064\u5f37\u5f15\u306a\u624b\u6cd5\u3067\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\n      - \u3069\u306e\u307f\u3061 pyopenjtalk \u5411\u3051 OpenJTalk \u3067\u306f `mecab-dict-index` \u30b3\u30de\u30f3\u30c9\u3092\u30d3\u30eb\u30c9\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\n- **[n5-suzuki/pyopenjtalk](https://github.com/n5-suzuki/pyopenjtalk/tree/develop) \u3067\u306e\u5909\u66f4\u3092\u53d6\u308a\u8fbc\u307f\u3001\u65e5\u672c\u8a9e\u30a2\u30af\u30bb\u30f3\u30c8\u30fb\u8aad\u307f\u63a8\u5b9a\u7cbe\u5ea6\u3092\u6539\u5584**\n  - [n5-suzuki/pyopenjtalk](https://github.com/n5-suzuki/pyopenjtalk/tree/develop) \u3067\u306f\u3001\u30ab\u30b9\u30bf\u30e0\u8f9e\u66f8 (bnken_jdic) \u306e\u8ffd\u52a0\u306b\u52a0\u3048 pyopenjtalk\u30fbOpenJTalk \u672c\u4f53\u3082\u3088\u308a\u81ea\u7136\u306a\u65e5\u672c\u8a9e\u30a2\u30af\u30bb\u30f3\u30c8\u30fb\u8aad\u307f\u3092\u63a8\u5b9a\u3067\u304d\u308b\u3088\u3046\u5927\u5e45\u306b\u6539\u826f\u3055\u308c\u3066\u3044\u308b\n  - \u7279\u306b\u8907\u6570\u306e\u8aad\u307f\u65b9\u3092\u3059\u308b\u6f22\u5b57\u306e\u8aad\u307f\u306b\u5bfe\u3057 [sudachipy](https://github.com/WorksApplications/SudachiPy) \u3067\u5f62\u614b\u7d20\u89e3\u6790\u3092\u884c\u3044\u3001\u5f97\u3089\u308c\u305f\u7d50\u679c\u3092\u4f7f\u3044 OpenJTalk \u304b\u3089\u8fd4\u3055\u308c\u305f `list[NJDFeature]` \u5185\u306e\u5024\u3092\u88dc\u6b63\u3057\u3066\u3044\u308b\u70b9\u304c\u30e6\u30cb\u30fc\u30af\n  - \u4ed6\u306b\u3082\u65e5\u672c\u8a9e\u30a2\u30af\u30bb\u30f3\u30c8\u30fb\u8aad\u307f\u306e\u63a8\u5b9a\u7cbe\u5ea6\u5411\u4e0a\u306e\u305f\u3081\u306e\u6d99\u3050\u307e\u3057\u3044\u52aa\u529b\u306e\u7d50\u6676\u304c\u591a\u304f\u53cd\u6620\u3055\u308c\u3066\u304a\u308a\u3001\u6709\u7528\u6027\u3092\u9451\u307f\u307b\u307c\u305d\u306e\u307e\u307e\u30de\u30fc\u30b8\u3057\u305f\n    - n5-suzuki \u6c0f\u3001a-ejiri \u6c0f\u306b\u6df1\u304f\u611f\u8b1d\u3044\u305f\u3057\u307e\u3059\ud83d\ude4f\n  - **\u3053\u306e\u307b\u304b\u300c\u4f55\u300d\u3092\u300c\u306a\u3093\u300d\u3068\u8aad\u3080\u304b\u300c\u306a\u306b\u300d\u3068\u8aad\u3080\u304b\u3092\u5224\u5b9a\u3059\u308b\u305f\u3081\u306e [scikit-learn \u3067\u5b9f\u88c5\u3055\u308c\u305f\u6a5f\u68b0\u5b66\u7fd2\u30e2\u30c7\u30eb\u306b\u3088\u308b\u30ed\u30b8\u30c3\u30af](pyopenjtalk/yomi_model/nani_predict.py) \u3082\u542b\u307e\u308c\u3066\u3044\u305f\u305f\u3081\u3001\u5b66\u7fd2\u6e08\u307f\u30e2\u30c7\u30eb\u3092 ONNX \u306b\u5909\u63db\u3057\u3066 scikit-learn 0.24.2 \u3078\u306e\u4f9d\u5b58\u306a\u3057\u306b\u52d5\u304b\u305b\u308b\u3088\u3046\u6539\u826f\u3057\u305f**\n    - \u5f53\u8a72\u30e2\u30c7\u30eb\u306f scikit-learn 0.24.2 \u3067\u3057\u304b\u52d5\u4f5c\u3057\u306a\u3044\u304c\u30013\u5e74\u4ee5\u4e0a\u524d\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f\u6975\u3081\u3066\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3064\u304d Python 3.11 \u4ee5\u964d\u3067\u306f\u52d5\u4f5c\u305b\u305a\u3001\u4f9d\u5b58\u95a2\u4fc2\u306e\u554f\u984c\u3082\u3042\u308a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u81ea\u4f53\u304c\u56f0\u96e3\u306b\u306a\u3063\u3066\u304d\u3066\u3044\u308b\n    - \u5b66\u7fd2\u7528\u30b3\u30fc\u30c9\u306f\u542b\u307e\u308c\u3066\u3044\u306a\u304b\u3063\u305f\u305f\u3081\u63a8\u6e2c\u3059\u308b\u3057\u304b\u306a\u3044\u304c\u3001\u30e2\u30c7\u30eb\u306e\u30d0\u30a4\u30ca\u30ea\u306b\u542b\u307e\u308c\u308b\u6587\u5b57\u5217\u304b\u3089\u3001RandomForestClassifier \u3092\u7528\u3044\u305f\u6bd4\u8f03\u7684\u5358\u7d14\u306a\u6a5f\u68b0\u5b66\u7fd2\u30e2\u30c7\u30eb\u3060\u3068\u63a8\u6e2c\u3055\u308c\u308b\n    - [ONNX \u5909\u63db\u30c4\u30fc\u30eb](pyopenjtalk/yomi_model/convert_onnx.py) \u3092\u81ea\u4f5c\u3057\u305f\u4e0a\u3067 ONNX \u306b\u5909\u63db\u3057\u3001[\u63a8\u8ad6\u30b3\u30fc\u30c9](pyopenjtalk/yomi_model/nani_predict.py) \u3082 ONNXRuntime \u3092\u7528\u3044\u3066\u63a8\u8ad6\u3059\u308b\u3088\u3046\u5909\u66f4\u3057\u305f\n      - \u3053\u306e\u5909\u66f4\u306b\u3088\u308a\u4f9d\u5b58\u95a2\u4fc2\u306b ONNXRuntime \u304c\u8ffd\u52a0\u3055\u308c\u308b\u304c\u3001\u3059\u3067\u306b\u6a5f\u68b0\u5b66\u7fd2\u95a2\u9023\u306e\u4ed6\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u4f9d\u5b58\u95a2\u4fc2\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u3082\u591a\u304f\u3001\u5b9f\u7528\u4e0a\u554f\u984c\u306a\u3044\u3068\u5224\u65ad\u3057\u305f\n- **[korguchi/pyopenjtalk](https://github.com/korguchi/pyopenjtalk) \u3067\u306e\u5909\u66f4\u3092\u53d6\u308a\u8fbc\u307f\u3001\u65e5\u672c\u8a9e\u306e\u8aad\u307f\u63a8\u5b9a\u7cbe\u5ea6\u3092\u6539\u5584**\n  - \u3053\u306e\u30d5\u30a9\u30fc\u30af\u3067\u5229\u7528\u3055\u308c\u3066\u3044\u308b [korguchi/open_jtalk](https://github.com/korguchi/open_jtalk) \u3067\u306f\u3001\u300c\u30af\u30a1\u300d\u3084\u300c\u30af\u30ee\u300d\u306a\u3069\u306e\u6bd4\u8f03\u7684\u73cd\u3057\u3044\u97f3\u7d20\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308b\n  - \u307b\u304b\u306b\u3082\u300c\uff01\u300d\uff08\u611f\u5606\u7b26\uff09\u3092\u300c\u8a18\u53f7/\u4e00\u822c\u300d\u3068\u3057\u3066\u6b63\u3057\u304f\u63a8\u5b9a\u3059\u308b\u305f\u3081\u306e\u6539\u826f\u306a\u3069\u3001\u6982\u306d\u526f\u4f5c\u7528\u306a\u3057\u306b\u7cbe\u5ea6\u5411\u4e0a\u304c\u898b\u8fbc\u3081\u308b\u3053\u3068\u304b\u3089\u3001\u6709\u7528\u6027\u3092\u9451\u307f\u307b\u307c\u305d\u306e\u307e\u307e\u30de\u30fc\u30b8\u3057\u305f\n- **[sabonerune/pyopenjtalk](https://github.com/sabonerune/pyopenjtalk) \u3067\u306e\u5909\u66f4\u3092\u53d6\u308a\u8fbc\u307f\u3001\u30b9\u30ec\u30c3\u30c9\u30bb\u30fc\u30d5\u5316\u3068\u4e00\u90e8 Cython \u30b3\u30fc\u30c9\u306e nogil \u5316\u3092\u9054\u6210**\n  - \u30b9\u30ec\u30c3\u30c9\u30bb\u30fc\u30d5\u5316\u306b\u3088\u308a\u3001\u8907\u6570\u30b9\u30ec\u30c3\u30c9\u304b\u3089\u5b89\u5168\u306b pyopenjtalk \u3092\u547c\u3073\u51fa\u305b\u308b\u3088\u3046\u306b\u306a\u3063\u305f\n  - \u4e00\u90e8 Cython \u30b3\u30fc\u30c9\u306e nogil \u5316\u306b\u3088\u308a\u3001\u82e5\u5e72\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u5411\u4e0a\u3082\u898b\u8fbc\u3081\u308b\n  - https://github.com/r9y9/pyopenjtalk/pull/87 \u3068 https://github.com/r9y9/pyopenjtalk/pull/88 \u306e\u5185\u5bb9\u3092\u4e00\u90e8\u6539\u5909\u306e\u4e0a\u3067\u53d6\u308a\u8fbc\u3093\u3060\n- **submodule \u306e OpenJTalk \u3092 [tsukumijima/open_jtalk](https://github.com/tsukumijima/open_jtalk) \u306b\u5909\u66f4**\n  - \u3053\u306e\u30d5\u30a9\u30fc\u30af\u3067\u306f\u3001pyopenjtalk-plus \u5411\u3051\u306b\u4e0b\u8a18\u306e\u30d5\u30a9\u30fc\u30af\u7248 OpenJTalk \u3067\u306e\u6539\u5584\u5185\u5bb9\u3092\u53d6\u308a\u8fbc\u3093\u3067\u3044\u308b\n    - [VOICEVOX/open_jtalk](https://github.com/VOICEVOX/open_jtalk)\n    - [a-ejiri/open_jtalk](https://github.com/a-ejiri/open_jtalk)\n    - [sophiefy/open_jtalk](https://github.com/sophiefy/open_jtalk)\n    - [korguchi/open_jtalk](https://github.com/korguchi/open_jtalk)\n- **submodule \u306e hts_engine_API \u3092 [syoyo/hts_engine_API](https://github.com/syoyo/hts_engine_API) \u306b\u5909\u66f4**\n  - \u3053\u306e\u30d5\u30a9\u30fc\u30af\u3067\u306f\u3001https://github.com/r9y9/hts_engine_API/issues/9 \u306b\u6319\u3052\u3089\u308c\u3066\u3044\u308b\u554f\u984c\u304c\u4fee\u6b63\u3055\u308c\u3066\u3044\u308b\n- **\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u958b\u767a\u74b0\u5883\u69cb\u7bc9\u30fb\u30d3\u30eb\u30c9\u30fb\u30b3\u30fc\u30c9\u6574\u5f62\u30fb\u30c6\u30b9\u30c8\u3092 `taskipy` \u306b\u3088\u308b\u30bf\u30b9\u30af\u30e9\u30f3\u30ca\u30fc\u3067\u306e\u7ba1\u7406\u306b\u5909\u66f4**\n- **\u5229\u7528\u4e88\u5b9a\u306e\u306a\u3044 Travis CI \u5411\u3051\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664**\n- **\u4e0d\u8981\u306a\u4f9d\u5b58\u95a2\u4fc2\u306e\u524a\u9664\u3001\u4f9d\u5b58\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u6574\u7406**\n- **\u305d\u306e\u4ed6\u30b3\u30fc\u30c9\u306e\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u3001\u975e\u63a8\u5968\u8b66\u544a\u306e\u89e3\u6d88\u306a\u3069**\n\n## Installation\n\n\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002\n\n```bash\npip install pyopenjtalk-plus\n```\n\n## Development\n\n\u958b\u767a\u74b0\u5883\u306f macOS / Linux \u3001Python \u30d0\u30fc\u30b8\u30e7\u30f3\u306f 3.11 \u304c\u524d\u63d0\u3067\u3059\u3002\n\n```bash\n# submodule \u3054\u3068\u30ea\u30dd\u30b8\u30c8\u30ea\u3092 clone\ngit clone --recursive https://github.com/tsukumijima/pyopenjtalk-plus.git\ncd pyopenjtalk-plus\n\n# \u30e9\u30a4\u30d6\u30e9\u30ea\u81ea\u8eab\u3068\u305d\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092 .venv/ \u4ee5\u4e0b\u306e\u4eee\u60f3\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\npip install taskipy\ntask install\n\n# \u30b3\u30fc\u30c9\u6574\u5f62\ntask lint\ntask format\n\n# \u30c6\u30b9\u30c8\u306e\u5b9f\u884c\ntask test\n\n# pyopenjtalk/dictionary/ \u4ee5\u4e0b\u306b\u3042\u308b MeCab / OpenJTalk \u8f9e\u66f8\u3092\u30d3\u30eb\u30c9\n## \u30d3\u30eb\u30c9\u6210\u679c\u7269\u306f\u540c\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b *.bin / *.dic \u3068\u3057\u3066\u51fa\u529b\u3055\u308c\u308b\n## \u30d3\u30eb\u30c9\u5f8c\u306e\u8f9e\u66f8\u30c7\u30fc\u30bf\u306f\u6570\u767e MB \u3042\u308b\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u3060\u304c\u3001\u53d6\u308a\u56de\u3057\u3084\u3059\u3044\u3088\u3046\u6562\u3048\u3066 Git \u7ba1\u7406\u4e0b\u306b\u542b\u3081\u3066\u3044\u308b\ntask build-dictionary\n\n# \u30e9\u30a4\u30d6\u30e9\u30ea\u306e wheel \u3068 sdist \u3092\u30d3\u30eb\u30c9\u3057\u3001dist/ \u306b\u51fa\u529b\ntask build\n\n# \u30d3\u30eb\u30c9\u6210\u679c\u7269\u3092\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\ntask clean\n```\n\n\u4e0b\u8a18\u306a\u3089\u3073\u306b [docs/](docs/) \u4ee5\u4e0b\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u3001[pyopenjtalk](https://github.com/r9y9/pyopenjtalk) \u672c\u5bb6\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u6539\u5909\u306a\u3057\u3067\u305d\u306e\u307e\u307e\u5f15\u304d\u7d99\u3044\u3067\u3044\u307e\u3059\u3002  \n\u3053\u308c\u3089\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u5185\u5bb9\u304c pyopenjtalk-plus \u306b\u3082\u901a\u7528\u3059\u308b\u304b\u306f\u4fdd\u8a3c\u3055\u308c\u307e\u305b\u3093\u3002\n\n-------\n\n# pyopenjtalk\n\n[![PyPI](https://img.shields.io/pypi/v/pyopenjtalk.svg)](https://pypi.python.org/pypi/pyopenjtalk)\n[![Python package](https://github.com/r9y9/pyopenjtalk/actions/workflows/ci.yaml/badge.svg)](https://github.com/r9y9/pyopenjtalk/actions/workflows/ci.yaml)\n[![Build Status](https://app.travis-ci.com/r9y9/pyopenjtalk.svg?branch=master)](https://app.travis-ci.com/r9y9/pyopenjtalk)\n[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md)\n[![DOI](https://zenodo.org/badge/143748865.svg)](https://zenodo.org/badge/latestdoi/143748865)\n\nA python wrapper for [OpenJTalk](http://open-jtalk.sp.nitech.ac.jp/).\n\nThe package consists of two core components:\n\n- Text processing frontend based on OpenJTalk\n- Speech synthesis backend using HTSEngine\n\n## Notice\n\n- The package is built with the [modified version of OpenJTalk](https://github.com/r9y9/open_jtalk). 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.\n- The package also uses the [modified version of hts_engine_API](https://github.com/r9y9/hts_engine_API). The same applies as above.\n\nBefore using the pyopenjtalk package, please have a look at the LICENSE for the two software.\n\n## Build requirements\n\nThe 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:\n\n- C/C++ compilers (to build C/C++ extentions)\n- cmake\n- cython\n\n## Supported platforms\n\n- Linux\n- Mac OSX\n- Windows (MSVC) (see [this PR](https://github.com/r9y9/pyopenjtalk/pull/13))\n\n## Installation\n\n```\npip install pyopenjtalk\n```\n\n## Development\n\nTo build the package locally, you will need to make sure to clone open_jtalk and hts_engine_API.\n\n```\ngit submodule update --recursive --init\n```\n\nand then run\n\n```\npip install -e .\n```\n\n## Quick demo\n\nPlease check the notebook version [here (nbviewer)](https://nbviewer.jupyter.org/github/r9y9/pyopenjtalk/blob/master/docs/notebooks/Demo.ipynb).\n\n### TTS\n\n```py\nIn [1]: import pyopenjtalk\n\nIn [2]: from scipy.io import wavfile\n\nIn [3]: x, sr = pyopenjtalk.tts(\"\u304a\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307e\u3059\")\n\nIn [4]: wavfile.write(\"test.wav\", sr, x.astype(np.int16))\n```\n\n### Run text processing frontend only\n\n```py\nIn [1]: import pyopenjtalk\n\nIn [2]: pyopenjtalk.extract_fullcontext(\"\u3053\u3093\u306b\u3061\u306f\")\nOut[2]:\n['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',\n'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/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',\n'sil^k-o+N=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/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',\n'k^o-N+n=i/A:-3+2+4/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',\n'o^N-n+i=ch/A:-2+3+3/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',\n'N^n-i+ch=i/A:-2+3+3/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',\n'n^i-ch+i=w/A:-1+4+2/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',\n'i^ch-i+w=a/A:-1+4+2/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',\n'ch^i-w+a=sil/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',\n'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',\n'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']\n```\n\nPlease check `lab_format.pdf` in [HTS-demo_NIT-ATR503-M001.tar.bz2](http://hts.sp.nitech.ac.jp/archives/2.3/HTS-demo_NIT-ATR503-M001.tar.bz2) for more details about full-context labels.\n\n\n### Grapheme-to-phoeneme (G2P)\n\n```py\nIn [1]: import pyopenjtalk\n\nIn [2]: pyopenjtalk.g2p(\"\u3053\u3093\u306b\u3061\u306f\")\nOut[2]: 'k o N n i ch i w a'\n\nIn [3]: pyopenjtalk.g2p(\"\u3053\u3093\u306b\u3061\u306f\", kana=True)\nOut[3]: '\u30b3\u30f3\u30cb\u30c1\u30ef'\n```\n\n### Create/Apply user dictionary\n\n1. Create a CSV file (e.g. `user.csv`) and write custom words like below:\n\n```csv\n\uff27\uff2e\uff35,,,1,\u540d\u8a5e,\u4e00\u822c,*,*,*,*,\uff27\uff2e\uff35,\u30b0\u30cc\u30fc,\u30b0\u30cc\u30fc,2/3,*\n```\n\n2. Call `mecab_dict_index` to compile the CSV file.\n\n```python\nIn [1]: import pyopenjtalk\n\nIn [2]: pyopenjtalk.mecab_dict_index(\"user.csv\", \"user.dic\")\nreading user.csv ... 1\nemitting double-array: 100% |###########################################|\n\ndone!\n```\n\n3. Call `update_global_jtalk_with_user_dict` to apply the user dictionary.\n\n```python\nIn [3]: pyopenjtalk.g2p(\"GNU\")\nOut[3]: 'j i i e n u y u u'\n\nIn [4]: pyopenjtalk.update_global_jtalk_with_user_dict(\"user.dic\")\n\nIn [5]: pyopenjtalk.g2p(\"GNU\")\nOut[5]: 'g u n u u'\n```\n\n### About `run_marine` option\n\nAfter v0.3.0, the `run_marine` option has been available for estimating the Japanese accent with the DNN-based method (see [marine](https://github.com/6gsn/marine)). If you want to use the feature, please install pyopenjtalk as below;\n\n```shell\npip install pyopenjtalk[marine]\n```\n\nAnd then, you can use the option as the following examples;\n\n```python\nIn [1]: import pyopenjtalk\n\nIn [2]: x, sr = pyopenjtalk.tts(\"\u304a\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307e\u3059\", run_marine=True) # for TTS\n\nIn [3]: label = pyopenjtalk.extract_fullcontext(\"\u3053\u3093\u306b\u3061\u306f\", run_marine=True) # for text processing frontend only\n```\n\n\n## LICENSE\n\n- pyopenjtalk: MIT license ([LICENSE.md](LICENSE.md))\n- Open JTalk: Modified BSD license ([COPYING](https://github.com/r9y9/open_jtalk/blob/1.10/src/COPYING))\n- htsvoice in this repository: Please check [pyopenjtalk/htsvoice/README.md](pyopenjtalk/htsvoice/README.md).\n- marine: Apache 2.0 license ([LICENSE](https://github.com/6gsn/marine/blob/main/LICENSE))\n\n## Acknowledgements\n\nHTS Working Group for their dedicated efforts to develop and maintain Open JTalk.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python wrapper for OpenJTalk with additional improvements",
    "version": "0.3.4.post10",
    "project_urls": {
        "Homepage": "https://github.com/tsukumijima/pyopenjtalk-plus"
    },
    "split_keywords": [
        "openjtalk",
        " research"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d5d3bc9ce5d9447bbd2c80aba3e0950861351d383a0063733fc6929ec6fdd9d7",
                "md5": "52d03cb6c7ea493e0237a944e6cac6e9",
                "sha256": "498d5d518c5603e3769d890f9046a5a05d52df0be5e7561335c34d44778d5970"
            },
            "downloads": -1,
            "filename": "pyopenjtalk_plus-0.3.4.post10-cp310-cp310-macosx_10_9_universal2.whl",
            "has_sig": false,
            "md5_digest": "52d03cb6c7ea493e0237a944e6cac6e9",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 25500997,
            "upload_time": "2024-12-25T00:07:07",
            "upload_time_iso_8601": "2024-12-25T00:07:07.823244Z",
            "url": "https://files.pythonhosted.org/packages/d5/d3/bc9ce5d9447bbd2c80aba3e0950861351d383a0063733fc6929ec6fdd9d7/pyopenjtalk_plus-0.3.4.post10-cp310-cp310-macosx_10_9_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4af93a2f82319a43e4b0fd84de2c0b122d7dd9924d5925dd3e5d42ed5c1c9f84",
                "md5": "b85b900e6ae03a96c6f17873fe6084dc",
                "sha256": "9857a8e10032df2a4cd8cbfd47b9e716113f52d0d32053779f40ea37ef925398"
            },
            "downloads": -1,
            "filename": "pyopenjtalk_plus-0.3.4.post10-cp310-cp310-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b85b900e6ae03a96c6f17873fe6084dc",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 24889387,
            "upload_time": "2024-12-25T00:07:13",
            "upload_time_iso_8601": "2024-12-25T00:07:13.826841Z",
            "url": "https://files.pythonhosted.org/packages/4a/f9/3a2f82319a43e4b0fd84de2c0b122d7dd9924d5925dd3e5d42ed5c1c9f84/pyopenjtalk_plus-0.3.4.post10-cp310-cp310-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d0994fd3cf851c06850f571a1b96876efcfe199637ba939fa99b238f0bd2f6ba",
                "md5": "2ed6d1a2c74afd7543cc5960809058c9",
                "sha256": "edca2b37323f5da4bd94442fdec12b32717b6a33a568710e082be52683bc6987"
            },
            "downloads": -1,
            "filename": "pyopenjtalk_plus-0.3.4.post10-cp310-cp310-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "2ed6d1a2c74afd7543cc5960809058c9",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 24849550,
            "upload_time": "2024-12-25T00:07:21",
            "upload_time_iso_8601": "2024-12-25T00:07:21.130533Z",
            "url": "https://files.pythonhosted.org/packages/d0/99/4fd3cf851c06850f571a1b96876efcfe199637ba939fa99b238f0bd2f6ba/pyopenjtalk_plus-0.3.4.post10-cp310-cp310-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "408c221022634b8d2ec6ebb7d99fc61054f51409039eba29a4f6ba832903ee63",
                "md5": "13f752a28a2696a4663bc1c58561f0dd",
                "sha256": "fad4dce1769a278944dca5eb3156aa130423f0bfa1e2e4da0a3e36bfa3b78f64"
            },
            "downloads": -1,
            "filename": "pyopenjtalk_plus-0.3.4.post10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "13f752a28a2696a4663bc1c58561f0dd",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 30737773,
            "upload_time": "2024-12-25T00:07:26",
            "upload_time_iso_8601": "2024-12-25T00:07:26.946372Z",
            "url": "https://files.pythonhosted.org/packages/40/8c/221022634b8d2ec6ebb7d99fc61054f51409039eba29a4f6ba832903ee63/pyopenjtalk_plus-0.3.4.post10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c0915beae4f4a549eeb76621484083c3ccb2c6f5a7572b6070d9d98c6b95b6d",
                "md5": "e4ae1bc5c43e63a6b5f8f17b9a39de6d",
                "sha256": "4dce87eec54a78480e8c92188e6b18d2e2711ebd804f8b0fa76e6a59a51caad2"
            },
            "downloads": -1,
            "filename": "pyopenjtalk_plus-0.3.4.post10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "e4ae1bc5c43e63a6b5f8f17b9a39de6d",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 30697287,
            "upload_time": "2024-12-25T00:07:33",
            "upload_time_iso_8601": "2024-12-25T00:07:33.147014Z",
            "url": "https://files.pythonhosted.org/packages/3c/09/15beae4f4a549eeb76621484083c3ccb2c6f5a7572b6070d9d98c6b95b6d/pyopenjtalk_plus-0.3.4.post10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fd465cc320e8ac4c9b29e2a35c0eb2f342d4d6485c1ce0d1001d2f1b09f1e66f",
                "md5": "39363feb654d7e251506051de7bae5a9",
                "sha256": "1285ec46f8ae06f0fe1021d35ab5f7056618c0c201136e6b187aac0dbab0675e"
            },
            "downloads": -1,
            "filename": "pyopenjtalk_plus-0.3.4.post10-cp310-cp310-win32.whl",
            "has_sig": false,
            "md5_digest": "39363feb654d7e251506051de7bae5a9",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 24689855,
            "upload_time": "2024-12-25T00:07:38",
            "upload_time_iso_8601": "2024-12-25T00:07:38.730061Z",
            "url": "https://files.pythonhosted.org/packages/fd/46/5cc320e8ac4c9b29e2a35c0eb2f342d4d6485c1ce0d1001d2f1b09f1e66f/pyopenjtalk_plus-0.3.4.post10-cp310-cp310-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "214e2c545ecc4726f4929394d6caecf4fc81c8168b0fd7b0726ea406359f342d",
                "md5": "13a44c92dad62b03b0db4bbc9490e025",
                "sha256": "259e02be4b5ee5a110caab46e820a4c70f932c7e6b67225a277f56b8a149ad7d"
            },
            "downloads": -1,
            "filename": "pyopenjtalk_plus-0.3.4.post10-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "13a44c92dad62b03b0db4bbc9490e025",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 24747346,
            "upload_time": "2024-12-25T00:07:43",
            "upload_time_iso_8601": "2024-12-25T00:07:43.763459Z",
            "url": "https://files.pythonhosted.org/packages/21/4e/2c545ecc4726f4929394d6caecf4fc81c8168b0fd7b0726ea406359f342d/pyopenjtalk_plus-0.3.4.post10-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "62322f600839262623c4458cb872bae9c4cbd0692e70288da5a2b7813b0b5a0d",
                "md5": "710575a22cada2574f8b3549235691c9",
                "sha256": "6d2d9a041246f4a2b6746d6c4f09a97f93dd4764535a85c42a9049f06d7efc5a"
            },
            "downloads": -1,
            "filename": "pyopenjtalk_plus-0.3.4.post10-cp310-cp310-win_arm64.whl",
            "has_sig": false,
            "md5_digest": "710575a22cada2574f8b3549235691c9",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 24699963,
            "upload_time": "2024-12-25T00:07:48",
            "upload_time_iso_8601": "2024-12-25T00:07:48.367561Z",
            "url": "https://files.pythonhosted.org/packages/62/32/2f600839262623c4458cb872bae9c4cbd0692e70288da5a2b7813b0b5a0d/pyopenjtalk_plus-0.3.4.post10-cp310-cp310-win_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-25 00:07:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tsukumijima",
    "github_project": "pyopenjtalk-plus",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyopenjtalk-plus"
}
        
Elapsed time: 7.43656s