Repository navigation
v2.1.0
JP
概要
v2.0.0 で導入した CapCut Web セッション連携 TTS 基盤をベースに、API 設計の刷新と新機能を追加したリリースです。
主な変更点
✨ 新機能
- 話者プレビュー音声エンドポイント (
GET /v2/speakers/{speakerId}/preview)- 指定した話者のプレビュー音声を取得可能に
- 初回アクセス時に生成し
speaker-preview-temp/へキャッシュ保存、以降はキャッシュを返却 - キャッシュ有効期限の設定に対応
🔄 リファクタリング / Breaking Changes
- API バージョンを v1 → v2 へ統一
- メインエンドポイントを
/v1/synthesize,/v1/modelsから/v2/synthesize,/v2/speakersへ移行 - 旧
/v1/legacyを/v1/synthesizeへ統合(legacy token+websocket フロー) - v1 エンドポイントは legacy 互換として残存
- メインエンドポイントを
- API 設計を最新構成へ変更
POST /v2/synthesizeを追加(JSON body 対応)- 共通エラーレスポンス (
ApiErrorResponse) を導入 - ルーティング構造をファイルシステムベースの規約に統一
.controller.tsパターンを廃止し、HTTP メソッド名ファイル (get.ts,post.ts) へ移行
🐛 バグ修正
- Editor bundle 設定の検証ロジックを強化(不正な設定値の早期検出)
🧹 その他
- 不要ファイルの削除 (
capcut-bundle-config.json.backup,dev-start.sh,example.service,update.bat)
エンドポイント一覧 (v2.1.0)
| メソッド | パス | 説明 |
|---|---|---|
| GET | /v2/speakers |
利用可能な話者一覧 |
| GET | /v2/speakers/{speakerId}/preview |
話者プレビュー音声取得 🆕 |
| GET | /v2/synthesize |
音声合成 (query params) |
| POST | /v2/synthesize |
音声合成 (JSON body) 🆕 |
| GET | /v1/models |
旧音声モデル一覧 (legacy) |
| GET | /v1/synthesize |
旧音声合成 (legacy token+ws) |
前バージョンからの移行
v2.0.0 からの移行:
/v1/models→/v2/speakers(レスポンス形式も変更)/v1/synthesize→/v2/synthesize(旧 v1 は legacy として残存)- エラーレスポンスが統一フォーマット (
{ code, message, details? }) に変更
EN
Summary
This release builds on the CapCut Web session-based TTS foundation introduced in v2.0.0, bringing a redesigned API structure and new features.
Highlights
✨ New Features
- Speaker preview audio endpoint (
GET /v2/speakers/{speakerId}/preview)- Retrieve preview audio for a specific speaker
- Audio is generated on first access and cached to
speaker-preview-temp/ - Configurable cache expiration
🔄 Refactoring / Breaking Changes
- Unified API version from v1 to v2
- Main endpoints migrated from
/v1/synthesize,/v1/modelsto/v2/synthesize,/v2/speakers - Former
/v1/legacyconsolidated into/v1/synthesize(legacy token+websocket flow) - v1 endpoints remain available for legacy compatibility
- Main endpoints migrated from
- Modernized API design
- Added
POST /v2/synthesize(JSON body support) - Introduced unified error response format (
ApiErrorResponse) - Routing structure aligned to file-system-based conventions
- Removed
.controller.tspattern in favor of HTTP method files (get.ts,post.ts)
- Added
🐛 Bug Fixes
- Strengthened editor bundle config validation logic (early detection of invalid config values)
🧹 Housekeeping
- Removed obsolete files (
capcut-bundle-config.json.backup,dev-start.sh,example.service,update.bat)
Endpoints (v2.1.0)
| Method | Path | Description |
|---|---|---|
| GET | /v2/speakers |
List available speakers |
| GET | /v2/speakers/{speakerId}/preview |
Get speaker preview audio 🆕 |
| GET | /v2/synthesize |
Text-to-speech (query params) |
| POST | /v2/synthesize |
Text-to-speech (JSON body) 🆕 |
| GET | /v1/models |
Legacy voice model list |
| GET | /v1/synthesize |
Legacy TTS (token+ws flow) |
Migration from v2.0.0
/v1/models→/v2/speakers(response format changed)/v1/synthesize→/v2/synthesize(v1 remains as legacy)- Error responses now use a unified format (
{ code, message, details? })