mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-19 03:01:15 +01:00
23 lines
463 B
PowerShell
23 lines
463 B
PowerShell
|
<#
|
|||
|
.SYNOPSIS
|
|||
|
Replies to "Hi"
|
|||
|
.DESCRIPTION
|
|||
|
This script replies to "Hi" by text-to-speech (TTS).
|
|||
|
.EXAMPLE
|
|||
|
PS> ./hi
|
|||
|
.NOTES
|
|||
|
Author: Markus Fleschutz · License: CC0
|
|||
|
.LINK
|
|||
|
https://github.com/fleschutz/PowerShell
|
|||
|
#>
|
|||
|
|
|||
|
try {
|
|||
|
$Reply = "Hello, how can I help?"
|
|||
|
"✔️ $Reply"
|
|||
|
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
|||
|
exit 0 # success
|
|||
|
} catch {
|
|||
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
|||
|
exit 1
|
|||
|
}
|