Skip to content

v2.1.0

Choose a tag to compare

@kuwacom kuwacom released this 09 May 13:21
· 13 commits to main since this release
ff6089f

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/models to /v2/synthesize, /v2/speakers
    • Former /v1/legacy consolidated into /v1/synthesize (legacy token+websocket flow)
    • v1 endpoints remain available for legacy compatibility
  • 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.ts pattern in favor of HTTP method files (get.ts, post.ts)

🐛 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? })