Eli Fulkerson .com HomeProjectsCommandline-text-to-speech
 

voice.exe

Description:

Voice.exe is a command line text to speech utility - just a thin wrapper around the builtin System.Speech.Synthesis. There are obviously a lot of variations on this elsewhere (most often called "say.exe") but I wanted to include a couple extra options.

Download:


Listing directory https://download.elifulkerson.com/files/voice/0.5: voice-src.zip March 22 2019 14:24:24 13598 Zip archive data, at least v2.0 to extract voice-src.zip.asc March 22 2019 14:25:06 801 GnuPG signature voice-src.zip.md5 March 22 2019 14:25:06 48 MD5 checksum voice-src.zip.sha1 March 22 2019 14:25:06 56 SHA1 checksum voice-src.zip.sha256 March 22 2019 14:25:06 80 SHA256 checksum voice-src.zip.sha512 March 22 2019 14:25:06 144 SHA512 checksum voice.exe March 22 2019 14:22:57 14848 PE32 executable (console) Intel 80386 Mono/.Net assembly, for MS Windows voice.exe.asc March 22 2019 14:24:54 801 GnuPG signature voice.exe.md5 March 22 2019 14:24:54 44 MD5 checksum voice.exe.sha1 March 22 2019 14:24:54 52 SHA1 checksum voice.exe.sha256 March 22 2019 14:24:54 76 SHA256 checksum voice.exe.sha512 March 22 2019 14:24:54 140 SHA512 checksumBrowse the download server

Usage:

input after command: voice [args] stuff to say goes here
-or-
input from stdin: echo something something stdin | voice [args]
-or-
interactive input: "voice -i" then type in whatever you want, hit enter, repeat. Control-C when bored.

"-d" exists as an end-of-argument delimiter. Otherwise you would never be able to say things that might be interpreted as arguments.
"-t" mode allows you to get voice output but still pass the data to some other process in the pipeline
Funky "-s" mode allows you to embed voice into a pipeline and enable scroll lock to get audio from inside the pipe. Does block while speaking, so it will slow everything down. "-s" implies "-t" behavior as well.


voice.exe v0.5 by Eli Fulkerson 15 Mar 2019
Just a thin command line wrapper around System.Speech.Synthesis.
http://www.elifulkerson.com for updates

Usage:  voice [-v VOLUME] [-r RATE] [-n NAME] [-m] [-f] [-l] [-d] [-?]
 -v X   : Speak at volume X, where X is 0 to 100
 -r X   : Speak at rate X, where X is -10 to 10
 -n "X" : Speak using named voice X
 -l     : List availabled named voices
 -m     : Just use a male voice, if available
 -f     : Just use a female voice, if available
 -d     : (Optional) Indicate that arguments are done.
          ... All text to the right of -d will be spoken even if it contains valid arguments.
 -i     : Interactive mode
 -t     : In pipe mode, output text to console as well as read it aloud
 -s     : In pipe mode, copy to stderr and read aloud only when scroll lock is enabled
 -p     : Output progress information to stdout (probably don't use with -t, -s)
         (Format is - CharPos:CharCount:AudioPos:Text)
 -k X   : Read from input filename X
 -o X   : Output to filename X in .WAV format (overwriting any previous file)
 --mono : By default, we output stereo (2 channels).  This flag outputs mono (1 channel)
 --8bit : By default, we output 16 bit samples.  This flag outputs 8 bit.)
 --khz X: Output at X khz.  Default 44.
 -?     : Help and version information

Optional:
For the sake of usability and/or self documentation, the *actual* arguments accepted are...
 -v or /v or /volume or --volume
 -r or /r or /rate or --rate
 -n or /n or /name or --name
 -l or /l or /list or --list
 -m or /m or /male or --male
 -f or /f or /female or --female
 -d or /d or /done or --done
 -i or /i or /interactive or --interactive
 -t or /t or /tee or --tee
 -s or /s or /scroll or --scroll
 -p or /p or /progress or --progress
 -k or /k or /input or --input
 -o or /o or /output or --output
  --mono or /mono
  --8bit or /8bit
  --khz or /khz
 -? or --? or /? or /h or -h or /help or --help or -help or nothing at all

Changelog:

v0.5 Mar 15 2019 - Added -p option to output progress information to stdout. This is the SpeechSynthesizer.SpeakProgress event.

Cygwin White Noise Generator:


#!/bin/bash
for i in `seq 1 10`;
do
        cat /dev/urandom|voice -f &
        cat /dev/urandom|voice -m &
done;

See also:

command line wav file player