https://github.com/sheepla/sapi
https://github.com/sheepla/sapi
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sheepla/sapi
- Owner: sheepla
- License: mit
- Created: 2021-08-09T15:20:49.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-09T15:20:58.000Z (almost 5 years ago)
- Last Synced: 2025-02-28T08:32:09.771Z (over 1 year ago)
- Language: PowerShell
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📢 Sapi
`Sapi` is a PowerShell module wrapper of Microsoft Speech API (SAPI).
## Features
- Speak any text from PowerShell command line
- Working on plain Windows without any libraries
## Environment
- OS: Supports only Windows, Testing on Windows 10
- PowerShell: Testing on Window PowerShell 5.1 and PowerShell Core 7.0.3
## Usage
### Syntax
```powershell
Invoke-Sapi [-Text] [-Rate ] [-Volume ] []
```
### Examples
```powershell
Invoke-Sapi -Text "Windowsでコンピューターの世界が広がります。"
"Windowsでコンピューターの世界が広がります。" | Invoke-Sapi # from pipeline input
say "Windowsでコンピューターの世界が広がります。" # use alias
```
## Installation
```powershell
# cd to module root dir
cd ~/Documents/PowerShell/Modules # PowerShell Core
cd ~/Documents/WindowsPowerShell/Modules # Windows PowerShell
# Clone this repository.
git clone https://github.com/sheepla/Sapi.git
# Import this module
Import-Module Sapi
```
If you want to import automatically, append this line to your `$PROFILE` file.
```powershell
Import-Module Sapi
```
## One Liner Edition
```powershell
(New-Object -Com Sapi.SpVoice).Speak("Windowsでコンピューターの世界が広がります。")
```