プレゼンテーション動画生成ツール リリース戦略
このドキュメントでは、プレゼンテーション動画生成ツール(PresentationVideoTool)のリリース戦略と依存関係の自動セットアップについて説明します。
概要
プレゼンテーション動画生成ツールは、以下の外部依存関係を必要とします:
- Marp CLI: Markdown からスライド画像を生成
- VOICEVOX Core: ナレーション音声を生成
- FFmpeg: 画像と音声を動画に合成
これらの依存関係を簡単にセットアップできるよう、自動化スクリプトを提供します。
依存関係の詳細
1. Marp CLI
用途: Markdown からスライド画像(PNG/PDF)を生成
インストール方法:
npm install -g @marp-team/marp-cli
必要条件: Node.js がインストールされていること
公式サイト: https://github.com/marp-team/marp-cli
2. VOICEVOX Core
用途: 日本語テキストから音声ファイル(WAV)を生成
インストール方法:
# Downloader を取得して実行
download-windows-x64.exe --c-api-version 0.16.0 --onnxruntime-version voicevox_onnxruntime-1.17.3 -o voicevox_core
特徴:
- VOICEVOX Engine と異なり、常駐プロセス不要
- CLI から直接呼び出し可能
- GPU/CPU 両対応
公式リポジトリ: https://github.com/VOICEVOX/voicevox_core
選定理由:
- ✅ CLI で完結(自動化可能)
- ✅ ライセンス対応(LGPL v3 + 使用許諾)
- ✅ 軽量(Engine より小さい)
- ✅ バージョン指定が容易
VoicePeak との比較:
- VoicePeak: 有料製品、個人利用のみ
- VOICEVOX Core: オープンソース、商用利用も可能(条件あり)
3. FFmpeg
用途: 画像シーケンスと音声ファイルを動画に合成
インストール方法:
# winget を使用
winget install -e --id Gyan.FFmpeg
# または chocolatey を使用
choco install ffmpeg -y
公式サイト: https://ffmpeg.org/
リリース構成
ディレクトリ構造
YourApp-v1.0.0/
├── YourApp.exe # メインアプリケーション
├── appsettings.json # 設定ファイル
├── setup.ps1 # ワンクリックセットアップスクリプト
├── README.md # クイックスタートガイド
├── LICENSE # ライセンス情報
└── docs/
├── manual-setup.md # 手動セットアップ手順
├── troubleshooting.md # トラブルシューティング
└── voicevox-license.txt # VOICEVOX ライセンス情報
配布フ ァイル
-
アプリケーション本体
- Self-contained 形式(.NET Runtime 同梱)
- または Framework-dependent(.NET 10 必要)
-
セットアップスクリプト
setup.ps1: 依存関係の自動インストールmanual-setup.md: スクリプトが使えない場合の手順
-
ドキュメント
- README.md: クイックスタート
- LICENSE: ライセンス情報(VOICEVOX の表記義務を含む)
自動セットアップスクリプト
setup.ps1 の実装
# setup.ps1
# プレゼンテーション動画生成ツール セットアップスクリプト
param(
[string]$VoicevoxCoreVersion = "0.16.0",
[string]$OnnxRuntimeVersion = "voicevox_onnxruntime-1.17.3",
[string]$CorePath = ".\voicevox_core"
)
$ErrorActionPreference = "Stop"
Write-Host "=== プレゼンテーション動画生成ツール セットアップ ===" -ForegroundColor Cyan
Write-Host ""
# Step 1: Node.js チェック
Write-Host "[1/4] Node.js の確認..." -ForegroundColor Yellow
try {
$nodeVersion = node --version
Write-Host " ✓ Node.js $nodeVersion が検出されました" -ForegroundColor Green
} catch {
Write-Host " ✗ Node.js が見つかりません" -ForegroundColor Red
Write-Host ""
Write-Host "Node.js をインストールしてください:" -ForegroundColor Red
Write-Host "https://nodejs.org/" -ForegroundColor Cyan
Write-Host ""
Write-Host "インストール後、PowerShell を再起動してこのスクリプトを再度実行してください。" -ForegroundColor Yellow
exit 1
}
# Step 2: Marp CLI インストール
Write-Host ""
Write-Host "[2/4] Marp CLI のインストール..." -ForegroundColor Yellow
try {
npm install -g @marp-team/marp-cli
$marpVersion = marp --version
Write-Host " ✓ Marp CLI $marpVersion がインストールされました" -ForegroundColor Green
} catch {
Write-Host " ✗ Marp CLI のインストールに失敗しました" -ForegroundColor Red
Write-Host " エラー: $_" -ForegroundColor Red
exit 1
}
# Step 3: FFmpeg インストール
Write-Host ""
Write-Host "[3/4] FFmpeg のインストール..." -ForegroundColor Yellow
$ffmpegInstalled = $false
# FFmpeg が既にインストールされているかチェック
try {
$ffmpegVersion = ffmpeg -version 2>$null
if ($LASTEXITCODE -eq 0) {
Write-Host " ✓ FFmpeg は既にインストールされています" -ForegroundColor Green
$ffmpegInstalled = $true
}
} catch {
# インストールされていない
}
if (-not $ffmpegInstalled) {
# winget を試す
if (Get-Command winget -ErrorAction SilentlyContinue) {
Write-Host " winget を使用して FFmpeg をインストール中..." -ForegroundColor Cyan
try {
winget install -e --id Gyan.FFmpeg --silent
Write-Host " ✓ FFmpeg がインストールされました" -ForegroundColor Green
Write-Host " ! PowerShell を再起動してください(環境変数を反映するため)" -ForegroundColor Yellow
} catch {
Write-Host " ✗ winget でのインストールに失敗しました" -ForegroundColor Red
}
}
# chocolatey を試す
elseif (Get-Command choco -ErrorAction SilentlyContinue) {
Write-Host " chocolatey を使用して FFmpeg をインストール中..." -ForegroundColor Cyan
try {
choco install ffmpeg -y
Write-Host " ✓ FFmpeg がインストールされました" -ForegroundColor Green
} catch {
Write-Host " ✗ chocolatey でのインストールに失敗しました" -ForegroundColor Red
}
}
else {
Write-Host " ✗ winget/chocolatey が見つかりません" -ForegroundColor Red
Write-Host ""
Write-Host "FFmpeg を手動でインストールしてください:" -ForegroundColor Yellow
Write-Host "https://ffmpeg.org/download.html" -ForegroundColor Cyan
Write-Host ""
Write-Host "または、以下のいずれかのパッケージマネージャーをインストールしてください:" -ForegroundColor Yellow
Write-Host "- winget (Windows 10 1809+ に標準搭載)" -ForegroundColor Cyan
Write-Host "- chocolatey (https://chocolatey.org/)" -ForegroundColor Cyan
Write-Host ""
}
}
# Step 4: VOICEVOX Core ダウンロード
Write-Host ""
Write-Host "[4/4] VOICEVOX Core のダウンロード..." -ForegroundColor Yellow
$downloaderUrl = "https://github.com/VOICEVOX/voicevox_core/releases/download/$VoicevoxCoreVersion/download-windows-x64.exe"
$downloaderPath = "$PSScriptRoot\download-windows-x64.exe"
try {
Write-Host " Downloader をダウンロード中..." -ForegroundColor Cyan
Invoke-WebRequest -Uri $downloaderUrl -OutFile $downloaderPath
Write-Host " VOICEVOX Core をダウンロード中(数分かかる場合があります)..." -ForegroundColor Cyan
& $downloaderPath --c-api-version $VoicevoxCoreVersion --onnxruntime-version $OnnxRuntimeVersion -o $CorePath
# Downloader を削除
Remove-Item $downloaderPath -Force
Write-Host " ✓ VOICEVOX Core がダウンロードされました" -ForegroundColor Green
Write-Host " 場所: $CorePath" -ForegroundColor Cyan
} catch {
Write-Host " ✗ VOICEVOX Core のダウンロードに失敗しました" -ForegroundColor Red
Write-Host " エラー: $_" -ForegroundColor Red
exit 1
}
# 完了メッセージ
Write-Host ""
Write-Host "=== セットアップ完了 ===" -ForegroundColor Green
Write-Host ""
Write-Host "次のステップ:" -ForegroundColor Yellow
Write-Host "1. appsettings.json を確認して、必要に応じて設定を変更してください" -ForegroundColor Cyan
Write-Host "2. YourApp.exe を実行してください" -ForegroundColor Cyan
Write-Host ""
Write-Host "注意: FFmpeg をインストールした場合、PowerShell を再起動してください" -ForegroundColor Yellow
Write-Host ""
実行方法
# 管理者権限で PowerShell を起動
# リリースディレクトリに移動
cd C:\path\to\YourApp-v1.0.0
# セットアップを実行
.\setup.ps1
# カスタムパスを指定する場合
.\setup.ps1 -CorePath "C:\CustomPath\voicevox_core"
手動セットアップ手順
setup.ps1 が使えない環境向けの手動セットアップ手順。
1. Node.js のインストール
- https://nodejs.org/ から LTS 版をダウンロード
- インストーラーを実行
- PowerShell を再起動
2. Marp CLI のインストール
npm install -g @marp-team/marp-cli
3. FFmpeg のインストール
オプション A: winget を使用(推奨)
winget install -e --id Gyan.FFmpeg
オプション B: chocolatey を使用
choco install ffmpeg -y
オプション C: 手動インストール
- https://ffmpeg.org/download.html から Windows 版をダウンロード
- 解凍して適切なディレクトリに配置
- システム環境変数
PATHに FFmpeg のbinディレクトリを追加