diff --git a/Scripts/speak-danish.ps1 b/Scripts/speak-danish.ps1 index 86b3344c..c5b08d6c 100755 --- a/Scripts/speak-danish.ps1 +++ b/Scripts/speak-danish.ps1 @@ -10,7 +10,7 @@ .LINK https://github.com/fleschutz/PowerShell .NOTES - Author: Markus Fleschutz / License: CC0 + Author: Markus Fleschutz | License: CC0 #> param([string]$text = "") diff --git a/Scripts/speak-english.ps1 b/Scripts/speak-english.ps1 index d5590e8d..50a8c892 100755 --- a/Scripts/speak-english.ps1 +++ b/Scripts/speak-english.ps1 @@ -10,7 +10,7 @@ .LINK https://github.com/fleschutz/PowerShell .NOTES - Author: Markus Fleschutz / License: CC0 + Author: Markus Fleschutz | License: CC0 #> param([string]$text = "") diff --git a/Scripts/speak-file.ps1 b/Scripts/speak-file.ps1 index aa068206..ae28998f 100755 --- a/Scripts/speak-file.ps1 +++ b/Scripts/speak-file.ps1 @@ -10,7 +10,7 @@ .LINK https://github.com/fleschutz/PowerShell .NOTES - Author: Markus Fleschutz / License: CC0 + Author: Markus Fleschutz | License: CC0 #> param([string]$File = "") diff --git a/Scripts/speak-french.ps1 b/Scripts/speak-french.ps1 index 165c8d06..d7254a17 100755 --- a/Scripts/speak-french.ps1 +++ b/Scripts/speak-french.ps1 @@ -10,7 +10,7 @@ .LINK https://github.com/fleschutz/PowerShell .NOTES - Author: Markus Fleschutz / License: CC0 + Author: Markus Fleschutz | License: CC0 #> param([string]$text = "") diff --git a/Scripts/speak-german.ps1 b/Scripts/speak-german.ps1 index 9a5fcb88..dbb33589 100755 --- a/Scripts/speak-german.ps1 +++ b/Scripts/speak-german.ps1 @@ -10,7 +10,7 @@ .LINK https://github.com/fleschutz/PowerShell .NOTES - Author: Markus Fleschutz / License: CC0 + Author: Markus Fleschutz | License: CC0 #> param([string]$text = "") diff --git a/Scripts/speak-italian.ps1 b/Scripts/speak-italian.ps1 index e8587efc..acc1e31d 100755 --- a/Scripts/speak-italian.ps1 +++ b/Scripts/speak-italian.ps1 @@ -10,7 +10,7 @@ .LINK https://github.com/fleschutz/PowerShell .NOTES - Author: Markus Fleschutz / License: CC0 + Author: Markus Fleschutz | License: CC0 #> param([string]$text = "") diff --git a/Scripts/speak-latin.ps1 b/Scripts/speak-latin.ps1 index 2941a310..9c83ef7a 100755 --- a/Scripts/speak-latin.ps1 +++ b/Scripts/speak-latin.ps1 @@ -10,7 +10,7 @@ .LINK https://github.com/fleschutz/PowerShell .NOTES - Author: Markus Fleschutz / License: CC0 + Author: Markus Fleschutz | License: CC0 #> param([string]$text = "") diff --git a/Scripts/speak-polish.ps1 b/Scripts/speak-polish.ps1 index 89ea1487..ee803ee2 100755 --- a/Scripts/speak-polish.ps1 +++ b/Scripts/speak-polish.ps1 @@ -10,7 +10,7 @@ .LINK https://github.com/fleschutz/PowerShell .NOTES - Author: Markus Fleschutz / License: CC0 + Author: Markus Fleschutz | License: CC0 #> param([string]$text = "") diff --git a/Scripts/speak-portuguese.ps1 b/Scripts/speak-portuguese.ps1 index 72860717..d0f1e167 100755 --- a/Scripts/speak-portuguese.ps1 +++ b/Scripts/speak-portuguese.ps1 @@ -10,7 +10,7 @@ .LINK https://github.com/fleschutz/PowerShell .NOTES - Author: Markus Fleschutz / License: CC0 + Author: Markus Fleschutz | License: CC0 #> param([string]$text = "") diff --git a/Scripts/speak-spanish.ps1 b/Scripts/speak-spanish.ps1 index 8cd0594d..48a4c15c 100755 --- a/Scripts/speak-spanish.ps1 +++ b/Scripts/speak-spanish.ps1 @@ -20,10 +20,11 @@ try { $TTSVoice = New-Object -ComObject SAPI.SPVoice foreach ($Voice in $TTSVoice.GetVoices()) { - if ($Voice.GetDescription() -like "*- Spanish*") { continue } - $TTSVoice.Voice = $Voice - [void]$TTSVoice.Speak($text) - exit 0 # success + if ($Voice.GetDescription() -like "*- Spanish*") { + $TTSVoice.Voice = $Voice + [void]$TTSVoice.Speak($text) + exit 0 # success + } } throw "No Spanish text-to-speech voice found - please install one." } catch { diff --git a/Scripts/speak-swedish.ps1 b/Scripts/speak-swedish.ps1 index 83f10789..9bc69168 100755 --- a/Scripts/speak-swedish.ps1 +++ b/Scripts/speak-swedish.ps1 @@ -10,7 +10,7 @@ .LINK https://github.com/fleschutz/PowerShell .NOTES - Author: Markus Fleschutz / License: CC0 + Author: Markus Fleschutz | License: CC0 #> param([string]$text = "") diff --git a/Scripts/speak-text.ps1 b/Scripts/speak-text.ps1 index a8e4988d..fda3efcc 100755 --- a/Scripts/speak-text.ps1 +++ b/Scripts/speak-text.ps1 @@ -10,7 +10,7 @@ .LINK https://github.com/fleschutz/PowerShell .NOTES - Author: Markus Fleschutz / License: CC0 + Author: Markus Fleschutz | License: CC0 #> param([string]$text = "")