param([string]$Root = 'C:\Users\seven\AletheiaBookTTS')

$ErrorActionPreference = 'Stop'
$env:PYTHONUTF8 = '1'
$env:PYTHONIOENCODING = 'utf-8'
$python = Join-Path $Root '.venv\Scripts\python.exe'
$work = Join-Path $Root 'work'
$output = Join-Path $work 'student-dataset-prosody-v1'
& $python (Join-Path $work 'booktts_student.py') dataset `
    --assets (Join-Path $Root 'teacher') `
    --corpus (Join-Path $Root 'corpus\booktts-prosody-balanced-v1.txt') `
    --output $output `
    --teacher-batch-size 16 `
    --teacher-dtype float16 `
    --reuse-token-map (Join-Path $work 'student-dataset-100000')
exit $LASTEXITCODE
