Jampal mp3 Library
Text to Speech


Summary of Features
Detailed Features
What's New?
Release Notes
Download
Installation & Getting Started
License & acknowledgements
Project Info

User's Guide
Library Window
Playlist Window
Track Editor Window
Customization
Advanced Topics
Regular Expressions
Trouble Shooting
Tables
ID3 Frame Descriptions

Command Line
jampal Command
Making an Envelope
Tag Backup
Text to Speech

Author
Peter Bennett

My Other Projects
Peter's Backup
Proxy and debug tool


Get Jampal mp3 library at SourceForge.net. Fast, secure and Free Open Source software downloads
Simple text to speech command line program

This is a very simple Microsoft Windows script to convert text to speech. If uses the windows scripting host and the Microsoft Text to Speech Engine. The Text to Speech Engine is installed with Windows XP and later versions.

For Linux or CYGWIN installations, there is a script file (ptts.sh) which provides everything here but supports many speech engines and languages. Run ptts.sh --help to get information on it. Note that under Linux the Microsoft speech engine will not work, another speech engine must be installed.

The text can be keyed in or read from a text file. The sound can be output to the computer sound system or sent to a wave file. Text is read from standard input or can be read from a file using a redirect, for example, to read aloud a text file:
cscript "C:\Program Files\Jampal\ptts.vbs" < war-and-peace.txt

To create a wav file from the text file (e.g create an audio book ;) ):
cscript "C:\Program Files\Jampal\ptts.vbs" -w war-and-peace.wav < war-and-peace.txt

Adjust the speech and voice defaults using the speech control panel option.

If you are running 64-bit windows you may only see 64-bit voices. If you have 32-bit voices you can access them by running
c:\windows\syswow64\cscript "C:\Program Files\Jampal\ptts.vbs"

Usage

Typing the command
cscript "C:\Program Files\Jampal\ptts.vbs" -h
will list out the available options.

Usage: cscript "C:\Program Files\Jampal\ptts.vbs" [options]

Option Explanation
-w filename Create a wave file instead of outputting sound. Wave file will be CD quality, 44100 samples per second, 16 bit, stereo unless changed by a -s or -c option.
-m filename Create multiple wave files, a new wave file after each empty input line. This appends nnnnn.wav to the filename.
-r rate Speech rate -10 to +10, default is 0.
-v volume Volume as a percentage, default is 100.
-s samples Samples per sec for wav file, default is 44100. Options are 8000, 16000, 22050, 44100, 48000.
-c channels Channels (1 or 2) for wav file, default is 2.
-u filename Read text from file instead from stdin. This can be either Unicode file, ANSI or default encoding. Specify encoding using the -e option.
-e encoding File encoding for the -u option. Options are ASCII, UTF-16LE. Default is the windows encoding for your system.
-voice xxxx Voice to be used.
-vl List voices.