Command Line Interface

The command line programs are useful for script based recognition and synthesis. They also provide sample code and a sample project for using the speechcloud-client API.

Running the Command Line Programs

There are 3 programs:

Command Description
Recognizer Recognizer accepts an audio file as a parameter, an optional grammar and returns the recognition results
Synthesizer Synthesizer accepts a text string and returns an audio stream. By default it streams it standard out. It provide options to direct the stream to a file or to the system speaker
MicRecognizer MicRecognizer gets the audio stream from the microphone and sends it to the recognizer. It returns the recognition results.

Command Usage

Recognizer.bat(.sh) [options]  
 Options:
   -help "prints help message"
   -service url  "url is location of cloud server"
   -endpoint Do endpoint on the server (default=no)"
   -lm "Use the language model (not the grammar) (defaults to using the grammar)"
   -batch "use batch processing on the server (for CMN stage))"

 Examples 
   recognizer.bat  -endpoint ..\etc\audio\get_me_a_stock_quote.wav file:///%SPEECHCLOUD_HOME%/etc/grammar/example.gram
   recognizer.bat  -endpoint -lm ..\etc\audio\get_me_a_stock_quote.wav 


Synthesizer.bat(.sh) [options] 
 Options:
   -help "prints help message"
   -service "location of speechcloud server
   -voice "voice name on the server"*
   -format "Format (wav, mp3 or au) of audio file (defaults to wav)"
   -sampleRate "sample rate in Hertz (defaults to 8000)"
   -endian "Endian (big or little) (defaults to big)"
   -sampleSize "Sample size in bits (defaults to 16)"

 Examples  
   synthesizer.bat "hello its me" >test.mp3
   synthesizer.bat -file test.mp3 "hello its me"
   synthesizer.bat -format wav "hello its me" >test.wav
   synthesizer.bat -format wav -play "hello its me" 


MicRecognizer.bat(.sh) [options] 
 Options:
   -help "prints help message"
   -service "location of the speechcloud server
   -mode "Endpointing Mode (s4 or normal) (defaults to Normal)"
   -stream "Stream Mode (feature or audio) (defaults to Audio)")
   -lm "Use the language model (not the grammar) (defaults to using the grammar)"

Examples  
   micrecognizer.bat -mode s4 file:///%SPEECHCLOUD_HOME%/etc/grammar/example.gram
   micrecognizer.bat -mode s4 -stream feature file:///%SPEECHCLOUD_HOME%/etc/grammar/example.gram

Transcriber.bat(.sh) [options] 
 Options:
   -help "prints help message"
   -service "location of the speechcloud server

Examples  
   transcriber.bat ../etc/audio/gtd.wav

Note some of the examples used SPEECHCLOUD_HOME env variable as a convenience. Remember to either set it to where you installed speechcloud-cli (or just use the complete path in the command line).
SET SPEECHCLOUD_HOME=c:\mydir\speechcloud-cli

Voices installed on the spokentech server at the time this was written

  • hmm-jmk
  • jmk-arctic
  • hmm-slt
  • slt-arctic
  • hmm-bdl
  • bdl-arctic