Skip to content

Commit 9c60ba2

Browse files
committed
Update the speak-*.ps1 scripts
1 parent 16489cb commit 9c60ba2

18 files changed

+23
-23
lines changed

Scripts/speak-arabic.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.DESCRIPTION
55
This PowerShell script speaks the given text with an Arabic text-to-speech (TTS) voice.
66
.PARAMETER text
7-
Specifies the text to speak
7+
Specifies the Arabic text to speak
88
.EXAMPLE
99
PS> ./speak-arabic.ps1 "أهلاً"
1010
.LINK

Scripts/speak-danish.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.DESCRIPTION
55
This PowerShell script speaks the given text with a Danish text-to-speech (TTS) voice.
66
.PARAMETER text
7-
Specifies the text to speak
7+
Specifies the Danish text to speak
88
.EXAMPLE
99
PS> ./speak-danish.ps1 Hej
1010
.LINK

Scripts/speak-dutch.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.DESCRIPTION
55
This PowerShell script speaks the given text with a Dutch text-to-speech (TTS) voice.
66
.PARAMETER text
7-
Specifies the text to speak
7+
Specifies the Dutch text to speak
88
.EXAMPLE
99
PS> ./speak-dutch.ps1 Hallo
1010
.LINK
@@ -18,11 +18,11 @@ param([string]$text = "")
1818
try {
1919
if ($text -eq "") { $text = Read-Host "Enter the Dutch text to speak" }
2020

21-
$TTSVoice = New-Object -ComObject SAPI.SPVoice
22-
foreach ($voice in $TTSVoice.GetVoices()) {
21+
$TTS = New-Object -ComObject SAPI.SPVoice
22+
foreach ($voice in $TTS.GetVoices()) {
2323
if ($voice.GetDescription() -like "*- Dutch*") {
24-
$TTSVoice.Voice = $voice
25-
[void]$TTSVoice.Speak($text)
24+
$TTS.Voice = $voice
25+
[void]$TTS.Speak($text)
2626
exit 0 # success
2727
}
2828
}

Scripts/speak-english.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.DESCRIPTION
55
This PowerShell script speaks the given text with an English text-to-speech (TTS) voice.
66
.PARAMETER text
7-
Specifies the text to speak
7+
Specifies the English text to speak
88
.EXAMPLE
99
PS> ./speak-english.ps1 Hi
1010
.LINK
@@ -16,7 +16,7 @@
1616
param([string]$text = "")
1717

1818
try {
19-
if ("$text" -eq "") { $text = Read-Host "Enter the English text to speak" }
19+
if ($text -eq "") { $text = Read-Host "Enter the English text to speak" }
2020

2121
$TTS = New-Object -ComObject SAPI.SPVoice
2222
foreach ($voice in $TTS.GetVoices()) {

Scripts/speak-french.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.DESCRIPTION
55
This PowerShell script speaks the given text with a French text-to-speech (TTS) voice.
66
.PARAMETER text
7-
Specifies the text to speak
7+
Specifies the French text to speak
88
.EXAMPLE
99
PS> ./speak-french.ps1 Salut
1010
.LINK

Scripts/speak-german.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.DESCRIPTION
55
This PowerShell script speaks the given text with a German text-to-speech (TTS) voice.
66
.PARAMETER text
7-
Specifies the text to speak
7+
Specifies the German text to speak
88
.EXAMPLE
99
PS> ./speak-german.ps1 Hallo
1010
.LINK

Scripts/speak-greek.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.DESCRIPTION
55
This PowerShell script speaks the given text with a Greek text-to-speech (TTS) voice.
66
.PARAMETER text
7-
Specifies the text to speak
7+
Specifies the Greek text to speak
88
.EXAMPLE
99
PS> ./speak-greek.ps1 "γεια"
1010
.LINK

Scripts/speak-hindi.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.DESCRIPTION
55
This PowerShell script speaks the given text with a Hindi text-to-speech (TTS) voice.
66
.PARAMETER text
7-
Specifies the text to speak
7+
Specifies the Hindi text to speak
88
.EXAMPLE
99
PS> ./speak-hindi.ps1 "नमस्ते"
1010
.LINK

Scripts/speak-italian.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.DESCRIPTION
55
This PowerShell script speaks the given text with an Italian text-to-speech (TTS) voice.
66
.PARAMETER text
7-
Specifies the text to speak
7+
Specifies the Italian text to speak
88
.EXAMPLE
99
PS> ./speak-italian.ps1 Ciao
1010
.LINK

Scripts/speak-japanese.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.DESCRIPTION
55
This PowerShell script speaks the given text with a Japanese text-to-speech (TTS) voice.
66
.PARAMETER text
7-
Specifies the text to speak
7+
Specifies the Japanese text to speak
88
.EXAMPLE
99
PS> ./speak-japanese.ps1 "ハロー"
1010
.LINK

0 commit comments

Comments
 (0)