rukano / SpeechCLI

Speech Command Line Interface Tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpeechCLI

Speech Command Line Interface Tool. The say terminal command is fun and practical, but you can't change the pitch and rate of the voice, which produces some funny effects on the integrated Mac OS X Speech Synthesizer. This code was made to practice my Objective-C skills (which are none) and try to understad how the NSSpeechSynthesizer works.

Usage

After compiling, you can use the binary as:

./SpeechCLI [arguments] "text to speak"

I usually rename the binary to say_better or say2 to keep a similar interface as the default say command.

Arguments

  • -v [string] VoiceName
  • -r [number] Rate in words per minute, from 0 to ... ???
  • -p [number] Pitch base note, from 0 to 127 (midi)
  • -m [number] Voice pitch modulation, from 0 to ???
  • -a [number] Volume from 0.0 to 1.0
  • -o [string] Output file path

If the -o argument is missing, the text will be spoken live, otherwise it will be rendered to the provided output file. The text to speak must be after the last argument.

Default arguments

  • Voice: Agnes
  • Volume: 1.0
  • Rate: 100.0
  • Pitch: 60.0
  • Modulation: 60.0
  • OutputFile: nil

About

Speech Command Line Interface Tool


Languages

Language:Objective-C 100.0%