Skip to content

Synethesize / play audio using Google text to speech from powershell

Notifications You must be signed in to change notification settings

jmbeach/powershell-google-tts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Powershell Google TTS

This powershell module synthesizes speech from text in Powershell using Google's Text-to-Speech API

To use this module, install it from the Powershell Gallery

Install-Module -Name powershell-google-tts

Add an environment variable GOOGLE_API_KEY_TTS and set the value to a valid API key.

Then, in Powershell, run Start-GoogleTTS 'your text here'.

If the text exceeds Google's maximum input, it automatically splits up the text into multiple requests and concatenates the audio output.

Usage

Start-GoogleTTS
  [-text] <string>      # The text to speak
  [-speed] <number>     # Optional speed of the speech (defaults to 1)
  [-outFile] <string>   # Optional path to save mp3 file of the TTS audio
  [-voiceName] <string> # Optional voice name - autocompletes (defaults to en-US-Standard-C)

Examples

Speak Text From File

Start-GoogleTTS $(cat ./example.txt | Out-String)

About

Synethesize / play audio using Google text to speech from powershell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published