sprex logo
Sprex
Banner Image
      
 

 

 

 

 

 

 

News: Downloadable PDA Demos

Introduction

Technical Description

How To

Documents

Product Brief

White Paper

Supported Platforms

Consulting

License Terms

NFL Demo

Downloads

Secure Travel Demo

FAQ's for Users
& Developers

Registration Form and License Agreement

SDK Access

Client Access

Feedback

Other Sprex Products/Services

Exit

 

 

 

 

 

 

 


Manual for gxc

GXC(1)             gxc 1.2: Man Page Version 4             GXC(1)



NAME
       gxc - grammar action compiler

SYNOPSIS
       gxc  -i  file.gx   [ -H file.h ] -l file.lat  -c file.c  [
       -v ] [ -d ] [ -h ]

DESCRIPTION
       gxc is a grammar action compiler.  gxc converts the speci-
       fied  file.gx  (grammar with actions) file into a recogni-
       tion lattice file (HTK SLF  format),  named  file.lat,  as
       well  as  a  results-processing module, named file.c which
       will carry out the associated actions when  a  recognition
       result  from  the  grammar  is  sent  to  it.  file.c will
       #include a supplied header file with declarations  of  any
       functions called by actions in the .gx file.

       For detailed documentation on building speech based appli-
       cations  using  gxc,  see  the  files  gxc.STEPBYSTEP  and
       gxc.TUTORIAL,      normally      installed      in     the
       /usr/share/doc/ansr-*/ directory.


OPTIONS
       -i  file.gx     The named file is a  grammar-with-actions,
       or  "gx"  file.  This is how you specify the possible word
       sequences that the recognizer may expect, along with asso-
       ciated  actions  that  the results-processing agent should
       carry out when handling any given recognition result.

       -H  file.h     This additional input file is  a  C  header
       file  which  should be created while writing file.gx.  You
       can look at some sample header files that are provided for
       the  sample  gx  files in /usr/share/sprex/ansr/resources.
       The filenames end in "_funcs.h".  Note that the data types
       of function arguments and function return values for those
       functions match the declarations in the  corresponding  gx
       files.   file_funcs.h  should  contain appropriately typed
       declarations for all of the functions called in the  vari-
       ous  actions  in  file.gx,  so that the results processing
       agent can compile and call those functions correctly.

       -l  file.lat     Into this output file will be  written  a
       compiled   grammar   network  representing  all  the  word
       sequences that could be spoken, as specified  in  file.gx.
       Make  this  file available to sprecd so that it can recog-
       nize the incoming audio stream against the grammar.  Also,
       check  that the dictionary used by sprecd includes pronun-
       ciations for each word in file.lat; lat2dict  should  help
       with this.

       -c  file.c     This output file is a C module that carries
       out the actions  associated  with  any  given  recognition
       result,  as  specified  in  file.gx.   It  can be compiled
       either as a standalone command-line  program  for  testing
       purposes  which reads a file of text representing a recog-
       nition result, or as an object file which can be linked to
       sprecc  or another client, enabling the client to call the
       handle_results(fd) function, which reads results from  the
       (normally  socket)  file  descriptor  and  carries out the
       specified actions.  In future versions  of  ANSR,  this  C
       module  may  operate  in  the  form  of  a separate daemon
       program rather than as part of the client.

       -v     Verbose output

       -d     Debug information from .gx parsing process.

       -h     print usage information


EXAMPLES
       To get a list of options and  their  explanation,  use  no
       options:

              example% gxc


       Generate .lat and .c from .gx and .h


              example%  gxc  -i  file.gx -l file.lat -H file.h -c
              file.c


       Generate a dictionary for use with Entropic's  HSGen  pro-
       gram,  then generate 10 sample sentences from the lattice.


              example% lat2dict -l file.lat -d file.dct

              example% HSGen -n 10 file.lat file.dct | sed 's/[A-
              Z0-9_$$.>]//g'


       Compile  agent into sprecc, run with sprecd to do the pro-
       cessing.


              example% cc -c file.c; cc -o sprecc sprecc  file.o;
              sprecd & sprecc



BUGS
       None  known.   Please  report  bugs to tv@sprex.com.  Your
       feedback on this document is solicited.


SEE ALSO
       lat2dict.  Several additional  docs  are  normally  to  be
       found   in  /usr/share/doc/ansr-*,  namely:  gxc.TUTORIAL,
       gxc.STEPBYSTEP, gxc.FAQERRORS, gxc.DESIGN, and  of  course
       the  sources.   Start  with  gxc.STEPBYSTEP to get a quick
       overview, then read gxc.TUTORIAL.


AUTHOR
       Tom Veatch, Sprex, Inc.   All  rights  reserved.   gxc  is
       licensed  software, to be used only under a license agree-
       ment with Sprex.



Product of Sprex, Inc.      28 Aug. 2003                   GXC(1)

We like comments. Send us a quick note here or with Co-Work.
   From:
Message:
        
Copyright © 1996-2005 Sprex, Inc. All rights reserved. Sprex, Speech in the Network, TallyGram and ANSR are trademarks of Sprex, Inc.
All other trademarks belong to their respective owners.
Date: August 7, 2008