Buckets:
| # AI Content Studio Pipeline | |
| # 1. Generate TTS (Kokoro-82M) | |
| # 2. Create video from images + audio | |
| # 3. Sync to Hugging Face Bucket | |
| param( | |
| [Parameter(Mandatory=$false)] | |
| [string]$ScriptFile = "", # path to Thai script text file | |
| [Parameter(Mandatory=$false)] | |
| [string]$ImageDir = "", # path to B-roll images folder | |
| [Parameter(Mandatory=$false)] | |
| [string]$OutputName = "video-$(Get-Date -Format 'yyyyMMdd-HHmmss')" | |
| ) | |
| $PipelineDir = "C:\AI-AMD\video-pipeline" | |
| $ImagesDir = if ($ImageDir) { $ImageDir } else { "$PipelineDir\images" } | |
| $AudioDir = "$PipelineDir\audio" | |
| $VideoDir = "$PipelineDir\video" | |
| $ScriptsDir = "$PipelineDir\scripts" | |
| # Ensure dirs exist | |
| @($ImagesDir, $AudioDir, $VideoDir) | ForEach-Object { | |
| if (-not (Test-Path $_)) { New-Item -ItemType Directory -Path $_ -Force | Out-Null } | |
| } | |
| Write-Host "=== AI Content Studio Pipeline ===" -ForegroundColor Cyan | |
| Write-Host "" | |
| # Step 1: Generate TTS Voice Over | |
| if ($ScriptFile -and (Test-Path $ScriptFile)) { | |
| Write-Host "[1/3] Generating Voice Over..." -ForegroundColor Yellow | |
| $AudioOut = "$AudioDir\$OutputName.wav" | |
| python "$ScriptsDir\tts-kokoro.py" --text-file $ScriptFile --output $AudioOut | |
| Write-Host " -> Saved: $AudioOut" -ForegroundColor Green | |
| } else { | |
| Write-Host "[1/3] Skipping TTS (no script file)" -ForegroundColor DarkGray | |
| } | |
| # Step 2: Generate video from images + audio | |
| $ImageFiles = Get-ChildItem -Path $ImagesDir -Include "*.png","*.jpg","*.jpeg","*.webp" -Recurse | Sort-Object Name | |
| if ($ImageFiles.Count -gt 0) { | |
| Write-Host "[2/3] Creating video from $($ImageFiles.Count) images..." -ForegroundColor Yellow | |
| $VideoOut = "$VideoDir\$OutputName.mp4" | |
| python "$ScriptsDir\make-video.py" --images-dir $ImagesDir --audio "$AudioDir\$OutputName.wav" --output $VideoOut | |
| Write-Host " -> Saved: $VideoOut" -ForegroundColor Green | |
| } else { | |
| Write-Host "[2/3] No images found in $ImagesDir" -ForegroundColor DarkGray | |
| } | |
| # Step 3: Sync to Hugging Face Bucket | |
| Write-Host "[3/3] Syncing to HF Bucket..." -ForegroundColor Yellow | |
| & "C:\Users\Kritnatee.Sk\.local\bin\hf.exe" sync "$PipelineDir\" "hf://buckets/kritnatee/Creator360.Studio-storage" --delete 2>&1 | |
| Write-Host " -> Sync complete!" -ForegroundColor Green | |
| Write-Host "" | |
| Write-Host "=== Pipeline Complete ===" -ForegroundColor Cyan | |
Xet Storage Details
- Size:
- 2.32 kB
- Xet hash:
- efd349c73c277cda33c26cfb6258e5e221da766e0708e3df706a57f95f18561f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.