fsg.h

Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
00002 /* ====================================================================
00003  * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
00004  * reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions
00008  * are met:
00009  *
00010  * 1. Redistributions of source code must retain the above copyright
00011  *    notice, this list of conditions and the following disclaimer. 
00012  *
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in
00015  *    the documentation and/or other materials provided with the
00016  *    distribution.
00017  *
00018  *
00019  * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
00020  * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
00021  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00022  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
00023  * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00024  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
00025  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
00026  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
00027  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
00028  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
00029  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00030  *
00031  * ====================================================================
00032  *
00033  */
00034 
00035 
00036 #ifndef __S2_FSG_H__
00037 #define __S2_FSG_H__
00038 
00039 #include "s3types.h"
00040 
00041 #ifdef __cplusplus
00042 extern "C" {
00043 #endif
00044 
00045 /*
00046  * Structures through which an application may load an FSG into the decoder.
00047  * There's essentially a 1-to-1 correspondence between the FSG file format
00048  * and these structures.
00049  */
00050 typedef struct s2_fsg_trans_s {
00051     int32 from_state;
00052     int32 to_state;
00053     float32 prob;                 /* Probability associated with transition */
00054     char *word;                   /* NULL for null transitions */
00055     struct s2_fsg_trans_s *next;  /* For linking together all transitions in FSG */
00056 } s2_fsg_trans_t;
00057 
00058 typedef struct s2_fsg_s {
00059     char *name;                   /* This would be the name on the FSG_BEGIN line
00060                                      in an FSG file.  Can be NULL or "" for unnamed
00061                                      FSGs */
00062     int32 n_state;                /* Set of states = 0 .. n_state-1 */
00063     int32 start_state;            /* 0 <= start_state < n_state */
00064     int32 final_state;            /* 0 <= final_state < n_state */
00065     s2_fsg_trans_t *trans_list;   /* Null-terminated list of transitions in FSG,
00066                                      in no particular order */
00067 } s2_fsg_t;
00068 
00069 #ifdef __cplusplus
00070 }
00071 #endif
00072 #endif

Generated on 7 Mar 2010 by  doxygen 1.6.1