Skip to content

Commit 9c08b72

Browse files
Play narration through speakers in addition to saving WAV file
1 parent 4905777 commit 9c08b72

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

scripts/speak.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ if ($dir -and -not (Test-Path $dir)) {
2828
New-Item -ItemType Directory -Path $dir -Force | Out-Null
2929
}
3030

31+
# Save to WAV file
3132
$synth.SetOutputToWaveFile($OutputPath)
3233
$synth.Speak($Text)
34+
35+
# Play through speakers so narration is heard live during the test run
3336
$synth.SetOutputToDefaultAudioDevice()
37+
$synth.Speak($Text)
38+
3439
$synth.Dispose()
3540

3641
Write-Host "Audio saved: $OutputPath"

0 commit comments

Comments
 (0)