.\" Title: jcontrol .\" Author: .\" Generator: DocBook XSL Stylesheets v1.71.0 .\" Date: 10/02/2008 .\" Manual: .\" Source: .\" .TH "JCONTROL" "1" "10/02/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" jcontrol \- a sample module client written in C .SH "SYNOPSIS" .HP 9 \fBjcontrol\fR {\fIhostname\fR} [\fIportnum\fR] .SH "DESCRIPTION" .PP \fBjcontrol\fR is a simple console program to control julius running on other host via network API. It can send command to Julius, and receive messages from Julius. .PP When invoked, jcontrol tries to connect to Julius running in "module mode" on specified hostname. After connection established, jcontrol waits for user commands from standard input. .PP When user types a command to jcontrol, it will be interpreted and cor\- responding API command will be sent to Julius. When a message is received from Julius, its content will be output to standard output. .PP For the details about the API, see the related documents. .SH "OPTIONS" .PP \fB hostname \fR .RS 3n Host name where Julius is runnning in module mode. .RE .PP \fB portnum \fR .RS 3n port number (default: 10500) .RE .SH "COMMANDS" .PP \fBjcontrol\fR interprets commands from standard input. Below is a list of all commands. .SS "Engine control" .PP pause .RS 3n Stop Julius and enter into paused status. In paused status, Julius will not run recognition even if speech input occurs. When this command is issued while recognition is running, Julius will stop after the recognition has been finished. .RE .PP terminate .RS 3n Same as pause, but discard the current speech input when received command in the middle of recognition process. .RE .PP resume .RS 3n Restart Julius that has been paused or terminated. .RE .PP inputparam \fIarg\fR .RS 3n Tell Julius how to deal with speech input in case grammar is changed just when recognition is running. Specify one: "TERMINATE", "PAUSE" or "WAIT". .RE .PP version .RS 3n Tell Julius to send version description string. .RE .PP status .RS 3n Tell Julius to send the system status (active / sleep) .RE .SS "Grammar handling" .PP changegram \fIprefix\fR .RS 3n Send a new grammar "\fIprefix.dfa\fR" and "\fIprefix.dict\fR", and tell julius to use it as a new grammar. All the current grammars used in the current process of Julius will be deleted and replaced to the specifed grammar. .RE .PP addgram \fIprefix\fR .RS 3n Send a new grammar "\fIprefix.dfa\fR" and "\fIprefix.dict\fR" and add it to the current grammar. .RE .PP deletegram \fIgramlist\fR .RS 3n Tell Julius to delete existing grammar. The grammar can be specified by either prefix name or number ID. The number ID can be determined from the message sent from Julius at each time grammar information has changed. When want to delete more than one grammar, specify all of them as comma\-sparated. .RE .PP deactivategram \fIgramlist\fR .RS 3n Tell Julius to de\-activate a specified grammar. The specified grammar will still be kept but will not be used for recognition. .sp The target grammar can be specified by either prefix name or number ID. The number ID can be determined from the message sent from Julius at each time grammar information has changed. When want to delete more than one grammar, specify all of them as comma\-sparated. .RE .PP activategram \fIgramlist\fR .RS 3n Tell Julius to activate previously de\-activated grammar. The target grammar can be specified by either prefix name or number ID. The number ID can be determined from the message sent from Julius at each time grammar information has changed. When want to delete more than one grammar, specify all of them as comma\-sparated. .RE .PP addword \fIgrammar_name_or_id\fR \fIdictfile\fR .RS 3n Add the recognition word entries in the specified \fIdictfile\fR to the specified grammar on current process. .RE .PP syncgram .RS 3n Force synchronize grammar status, like unix command "sync". .RE .SS "Process management" .PP Julius\-4 supports multi\-model recognition nad multi decoding. In this case it is possible to control each recognition process, as defined by "\fB\-SR\fR" option, from module client. .PP In multi decoding mode, the module client holds "current process", and the process commands and grammar related commands will be issued toward the current process. .PP listprocess .RS 3n Tell Julius to send the list of existing recognition process. .RE .PP currentprocess \fIprocname\fR .RS 3n Switch the current process to the process specified by the name. .RE .PP shiftprocess .RS 3n Rotate the current process. At each call the current process will be changed to the next one. .RE .PP addprocess \fIjconffile\fR .RS 3n Tell Julisu to load a new recognition process into engine. The argument \fIjconffile\fR should be a jconf file that contains only one set of LM options and one SR definition. Note that the file should be visible on the running Julius, since \fBjcontrol\fR only send the path name and Julius actually read the jconf file. .sp The new LM and SR process will have the name of the jconffile. .RE .PP delprocess \fIprocname\fR .RS 3n Delete the specified recognition process from the engine. .RE .PP deactivateprocess \fIprocname\fR .RS 3n Tell Julius to temporary stop the specified recognition process. The stopped process will not be executed for the input until activated again. .RE .PP activateprocess \fIprocname\fR .RS 3n Tell Julius to activate the temporarily stopped process. .RE .SH "EXAMPLES" .PP The dump messages from Julius are output to tty with prefix ">" appended to each line. Julius can be started in module mode like this: .sp .RS 3n .nf % \fBjulius\fR \-C ... \-module .fi .RE \fBjcontrol\fRcan be launched with the host name: .sp .RS 3n .nf % \fBjcontrol\fR hostname .fi .RE It will then receive the outputs of Julius and output the raw message to standard out. Also, by inputting the commands above to the standard input of \fBjcontrol\fR, it will be sent to Julius. See manuals for the specification of module mode. .SH "SEE ALSO" .PP \fB julius \fR( 1 ) .SH "COPYRIGHT" .PP Copyright (c) 1997\-2000 Information\-technology Promotion Agency, Japan .PP Copyright (c) 1991\-2008 Kawahara Lab., Kyoto University .PP Copyright (c) 2000\-2005 Shikano Lab., Nara Institute of Science and Technology .PP Copyright (c) 2005\-2008 Julius project team, Nagoya Institute of Technology .SH "LICENSE" .PP The same as Julius.