tts-plugin-bridge
Website • Report Bug • Contributing
🚀 Overview
TTSエンジンのプラグイン化・動的発見・Agent連携を可能にするコアフレームワークです。
✨ 特徴
- 🔌 Entry Points による自動発見:
uv add tts-plugin-xxxするだけで自動的にブリッジへ登録 - 🔀 エンジン非依存: コアパッケージは特定のTTSに依存せず、軽量で安定
- 🤖 Agent 最適化:
TTSSkillクラスで非同期呼び出し・パラメータ統一・Base64出力を標準提供 - 🛡️ 型安全: Pydantic ベースのリクエスト/レスポンスでバリデーション自動実行
- 🎤 vox4ai CLI: 統一インターフェースの
vox4aiコマンドを同梱(say/save/list/test + 環境診断)
🧩 TTS Engine プラグイン
各 TTS Engine は独立したプラグインとして提供されます。
uv add tts-plugin-<name> で導入するだけです。
| プラグイン | リポジトリ | バックエンド | 特徴 |
|---|---|---|---|
| tts-plugin-edgetts | vox4ai/tts-plugin-edgetts | edge-tts (Microsoft Edge TTS) | ローカルサーバー不要・APIキー不要・すぐ使える・多言語・ffplayストリーミング再生 |
| tts-plugin-aivisspeech | vox4ai/tts-plugin-aivisspeech | AivisSpeech Engine | VOICEVOX互換API・日本語高品質・Docker運用・複数話者・WAV出力 |
| tts-plugin-kokoro | vox4ai/tts-plugin-kokoro | kokoro (ローカル推論) | 完全オフライン・espeak-ng必要・モデル別途DL・ローカル音声合成 |
| tts-plugin-piperplus | vox4ai/tts-plugin-piperplus | Piper / Piper Plus HTTP Server | 軽量・Raspberry Piでも動作・ローカルHTTPサーバー |
| tts-plugin-voisonatalk | vox4ai/tts-plugin-voisonatalk | VoiSona Talk Editor (REST API) | 歌声・読み上げ対応・Windows/Mac・BasicAuth認証・直接スピーカー出力 |
全て
uv add tts-plugin-<name>で bridge プロジェクトに追加できます。vox4ai listで導入済みプラグインを確認できます。
📦 インストール
uv add tts-plugin-bridge
🛠 Usage
🧩 Python API
from tts_plugin_bridge import TTSSkill
async with TTSSkill(default_engine="edgetts") as skill:
# 音声ファイルに保存(save は synthesize の alias)
res = await skill.save(
text="こんにちは",
speed=1.2,
volume=1.0,
)
with open("output.mp3", "wb") as f:
f.write(base64.b64decode(res["audio_base64"]))
# 直接再生(say は play の alias)
res = await skill.say(
text="こんにちは",
model="ja-JP-KeitaNeural",
)
メソッド一覧
| メソッド | alias | 戻り値 | 用途 |
|---|---|---|---|
synthesize() |
save() |
dict (Base64) |
音声合成してBase64として返す |
play() |
say() |
dict |
直接再生(ストリーミング優先→全取得後再生) |
close() |
- | None |
全コネクタのリソース解放 |
say()/play()は Engine がsynthesize_stream()を実装していれば ffplay でストリーミング、なければ synthesize → paplay/aplay で再生- Engine ごとに再生方式が異なるが、ユーザーは
say()という同じインターフェースで使える
🎤 vox4ai CLI
vox4ai は tts-plugin-bridge に同梱される統合TTS操作コマンドです。
サブコマンドで直感的に操作できます。
vox4ai say "こんにちは"
vox4ai save "こんにちは" -o output.wav
vox4ai list
vox4ai test -e aivisspeech
グローバルオプション
vox4ai --commands # 利用可能なサブコマンド一覧
vox4ai --doctor # 環境診断(再生コマンド・プラグイン・パッケージ)
vox4ai --tts-plugin-list # TTS Engine 一覧(listと同じ)
vox4ai --doctor で確認できる項目
- 再生コマンド: ffplay / paplay / aplay の有無
- 登録TTSプラグイン一覧
- Python パッケージ導入状況
サブコマンド
say — テキストを読み上げる(ストリーミング再生優先)
vox4ai say "こんにちは" # デフォルトエンジン
vox4ai say "Hello" -e edgetts # Edge TTS(ffplayストリーミング)
vox4ai say "こんにちは" -e aivisspeech # AivisSpeech
--server-url http://localhost:10101
--style-id 888753760
vox4ai say "Hello" -e edgetts # 話速・声指定
--speed 1.5
--model en-US-AndrewNeural
save — テキストを音声ファイルに保存
vox4ai save "こんにちは" -o hello.wav # WAV保存
vox4ai save "こんにちは" -e edgetts -o out.mp3 # Edge TTS(MP3)
vox4ai save "こんにちは" -e aivisspeech # AivisSpeech
--server-url http://localhost:10101
--style-id 888753760
--output hello.wav
vox4ai save "こんにちは" --play # 保存後に再生
list — 利用可能なTTSプラグイン一覧
vox4ai list
test — TTSエンジン接続テスト
vox4ai test -e edgetts
vox4ai test -e aivisspeech --server-url http://localhost:10101 --style-id 888753760
ヘルプ
vox4ai --help # 全体ヘルプ
vox4ai say --help # say サブコマンドのヘルプ
vox4ai save --help # save サブコマンドのヘルプ
🔧 プラグイン開発者向け
独自のTTSエンジンをプラグイン化するには、pyproject.toml にエントリーポイントを定義するだけです。
詳細は各プラグインリポジトリのドキュメントを参照してください。
🔍 検証環境
- OS: Windows 11 + WSL2 (Ubuntu)
- 確認日: 2026-05-09
- 確認プラグイン: aivisspeech (Engine v1.2.0), edgetts (edge-tts v7.2.8), kokoro
- 確認内容:
vox4ai say/save/list/test/--doctor/--commands全動作確認- 全ユニットテストパス: bridge 11件, aivisspeech 16件, edgetts 22件
📜 ライセンス
MIT License
Metadata
Release files for tts-plugin-bridge 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tts_plugin_bridge-0.1.0.tar.gz | 10.3 kB | Without provenance | Details for tts_plugin_bridge-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tts_plugin_bridge-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for tts_plugin_bridge-0.1.0-py3-none-any.whl |
Total release size: 19.6 kB
Release files / tts_plugin_bridge-0.1.0.tar.gz
| Download URL | tts_plugin_bridge-0.1.0.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18cfec0b85da0af1e50896dc129acfda49ff47f87bc4e732d7dddd49ae45fc55
|
|
BLAKE2b-256 checksum How to use checksums |
b2915fa8054e2fef5ccc2b9905660517de3d40a3da6e47f6cb76d8de3fa739fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Release files / tts_plugin_bridge-0.1.0-py3-none-any.whl
| Download URL | tts_plugin_bridge-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f76314a5714d10d0202070c8d9de9a79a6bd25255d3756606fc32c2da567164f
|
|
BLAKE2b-256 checksum How to use checksums |
0adf1dcc2c9e5daea4a4b66ca7aafd82921ff9ce18f138dd24d1d09a645a9411
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Security for tts-plugin-bridge 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.