Improve the scripts

This commit is contained in:
Markus Fleschutz
2021-04-08 13:27:03 +02:00
parent f18ff005f6
commit bb5bb64827
5 changed files with 18 additions and 19 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/pwsh
<#
.SYNTAX speak-countdown.ps1 [start-number]
.DESCRIPTION speaks a countdown by text-to-speech (TTS)
.DESCRIPTION starts a countdown by text-to-speech (TTS)
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
@ -11,8 +11,9 @@ param([int]$StartNumber = 10)
try {
for ([int]$i = $StartNumber; $i -gt 0; $i--) {
& "$PSScriptRoot/speak-english.ps1" $i
start-sleep -milliseconds 1000
start-sleep -milliseconds 200
}
& "$PSScriptRoot/speak-english.ps1" "zero"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"