mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-02 19:09:13 +01:00
Update the speak-*.ps1 scripts
This commit is contained in:
parent
16489cb0b0
commit
9c60ba2de7
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with an Arabic text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with an Arabic text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Arabic text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-arabic.ps1 "أهلاً"
|
PS> ./speak-arabic.ps1 "أهلاً"
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Danish text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Danish text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Danish text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-danish.ps1 Hej
|
PS> ./speak-danish.ps1 Hej
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Dutch text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Dutch text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Dutch text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-dutch.ps1 Hallo
|
PS> ./speak-dutch.ps1 Hallo
|
||||||
.LINK
|
.LINK
|
||||||
@ -18,11 +18,11 @@ param([string]$text = "")
|
|||||||
try {
|
try {
|
||||||
if ($text -eq "") { $text = Read-Host "Enter the Dutch text to speak" }
|
if ($text -eq "") { $text = Read-Host "Enter the Dutch text to speak" }
|
||||||
|
|
||||||
$TTSVoice = New-Object -ComObject SAPI.SPVoice
|
$TTS = New-Object -ComObject SAPI.SPVoice
|
||||||
foreach ($voice in $TTSVoice.GetVoices()) {
|
foreach ($voice in $TTS.GetVoices()) {
|
||||||
if ($voice.GetDescription() -like "*- Dutch*") {
|
if ($voice.GetDescription() -like "*- Dutch*") {
|
||||||
$TTSVoice.Voice = $voice
|
$TTS.Voice = $voice
|
||||||
[void]$TTSVoice.Speak($text)
|
[void]$TTS.Speak($text)
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with an English text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with an English text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the English text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-english.ps1 Hi
|
PS> ./speak-english.ps1 Hi
|
||||||
.LINK
|
.LINK
|
||||||
@ -16,7 +16,7 @@
|
|||||||
param([string]$text = "")
|
param([string]$text = "")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if ("$text" -eq "") { $text = Read-Host "Enter the English text to speak" }
|
if ($text -eq "") { $text = Read-Host "Enter the English text to speak" }
|
||||||
|
|
||||||
$TTS = New-Object -ComObject SAPI.SPVoice
|
$TTS = New-Object -ComObject SAPI.SPVoice
|
||||||
foreach ($voice in $TTS.GetVoices()) {
|
foreach ($voice in $TTS.GetVoices()) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a French text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a French text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the French text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-french.ps1 Salut
|
PS> ./speak-french.ps1 Salut
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a German text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a German text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the German text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-german.ps1 Hallo
|
PS> ./speak-german.ps1 Hallo
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Greek text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Greek text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Greek text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-greek.ps1 "γεια"
|
PS> ./speak-greek.ps1 "γεια"
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Hindi text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Hindi text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Hindi text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-hindi.ps1 "नमस्ते"
|
PS> ./speak-hindi.ps1 "नमस्ते"
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with an Italian text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with an Italian text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Italian text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-italian.ps1 Ciao
|
PS> ./speak-italian.ps1 Ciao
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Japanese text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Japanese text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Japanese text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-japanese.ps1 "ハロー"
|
PS> ./speak-japanese.ps1 "ハロー"
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Latin text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Latin text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Latin text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-latin.ps1 Salve
|
PS> ./speak-latin.ps1 Salve
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Mandarin text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Mandarin text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Mandarin text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-mandarin.ps1 "你好"
|
PS> ./speak-mandarin.ps1 "你好"
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Polish text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Polish text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Polish text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-polish.ps1 cześć
|
PS> ./speak-polish.ps1 cześć
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Portuguese text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Portuguese text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Portuguese text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-portuguese.ps1 Olá
|
PS> ./speak-portuguese.ps1 Olá
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Spanish text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Spanish text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Spanish text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-spanish.ps1 Hola
|
PS> ./speak-spanish.ps1 Hola
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Swedish text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Swedish text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Swedish text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-swedish.ps1 Hallå
|
PS> ./speak-swedish.ps1 Hallå
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Turkish text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Turkish text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Turkish text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-turkish.ps1 Merhaba
|
PS> ./speak-turkish.ps1 Merhaba
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script speaks the given text with a Ukrainian text-to-speech (TTS) voice.
|
This PowerShell script speaks the given text with a Ukrainian text-to-speech (TTS) voice.
|
||||||
.PARAMETER text
|
.PARAMETER text
|
||||||
Specifies the text to speak
|
Specifies the Ukranian text to speak
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./speak-ukrainian.ps1 "Привіт"
|
PS> ./speak-ukrainian.ps1 "Привіт"
|
||||||
.LINK
|
.LINK
|
||||||
|
Loading…
Reference in New Issue
Block a user