mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 09:04:18 +01:00
Added txt2wav.ps1
This commit is contained in:
parent
33c3699d22
commit
20eae280f8
11
README.md
11
README.md
@ -3,6 +3,17 @@ Collection of PowerShell Scripts
|
|||||||
|
|
||||||
Useful cross-platform PowerShell scripts, to be used on the command-line (CLI) or by automation software like Jenkins.
|
Useful cross-platform PowerShell scripts, to be used on the command-line (CLI) or by automation software like Jenkins.
|
||||||
|
|
||||||
|
PowerShell Scripts
|
||||||
|
------------------
|
||||||
|
* password.ps1 - generates and prints a single new password
|
||||||
|
* passwords.ps1 - generates and prints a list of new passwords
|
||||||
|
* poweroff.ps1 - halts the local computer, administrator rights might be needed
|
||||||
|
* reboot.ps1 - reboots the local computer, administrator rights might be needed
|
||||||
|
* speak.ps1 - speaks the given text
|
||||||
|
* translate.ps1 - translates the given text
|
||||||
|
* txt2wav.ps1 - converts text into a audio .WAV file
|
||||||
|
* wakeup.ps1 - sends a magic packet to the given computer, waking him up
|
||||||
|
|
||||||
What is PowerShell?
|
What is PowerShell?
|
||||||
-------------------
|
-------------------
|
||||||
PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language.
|
PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language.
|
||||||
|
20
txt2wav.ps1
Executable file
20
txt2wav.ps1
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
# PowerShell Script to Convert Text to Audio WAV files
|
||||||
|
# ----------------------------------------------------
|
||||||
|
# Author: Markus Fleschutz
|
||||||
|
# Source: github.com/fleschutz/PowerShell
|
||||||
|
# License: CC0
|
||||||
|
|
||||||
|
# Configuration:
|
||||||
|
$Text = "Hello, my name ist Bond, James Bond"
|
||||||
|
$Speed = -1 # -10 is slowest, 10 is fastest
|
||||||
|
$TargetWavFile = "spoken.wav"
|
||||||
|
|
||||||
|
# Run:
|
||||||
|
Add-Type -AssemblyName System.Speech
|
||||||
|
$SpeechSynthesizer = New-Object System.Speech.Synthesis.SpeechSynthesizer
|
||||||
|
# $SpeechSynthesizer.SelectVoice("Microsoft Eva Mobile")
|
||||||
|
$SpeechSynthesizer.Rate = $Speed
|
||||||
|
$SpeechSynthesizer.SetOutputToWaveFile($TargetWavFile)
|
||||||
|
$SpeechSynthesizer.Speak($Text)
|
||||||
|
$SpeechSynthesizer.Dispose()
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user