Created
February 27, 2021 16:01
-
-
Save sheepla/9ccc7094922c01fbfffd392d02a937d5 to your computer and use it in GitHub Desktop.
PowerShellで音声読み上げ(SAPI: https://ja.wikipedia.org/wiki/Speech_Application_Programming_Interface)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function say | |
{ | |
Param ( | |
[Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$false, Position=1)] | |
[String] $Text | |
) | |
$spVoice= New-Object -ComObject Sapi.Spvoice | |
$spVoice.Speak($Text) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment