An open API service indexing awesome lists of open source software.

https://github.com/sheepla/sapi


https://github.com/sheepla/sapi

Last synced: 9 months ago
JSON representation

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でコンピューターの世界が広がります。")
```