Classes |
struct | s3_decode_t |
Defines |
#define | __S3_DECODE_H |
#define | S3_DECODE_SUCCESS 0 |
#define | S3_DECODE_ERROR_OUT_OF_MEMORY -0x01 |
#define | S3_DECODE_ERROR_NULL_POINTER -0x02 |
#define | S3_DECODE_ERROR_INVALID_STATE -0x04 |
#define | S3_DECODE_ERROR_INTERNAL -0x08 |
#define | S3_DECODE_STATE_IDLE 0 |
#define | S3_DECODE_STATE_DECODING 1 |
#define | S3_DECODE_STATE_FINISHED 2 |
Functions |
S3DECODER_EXPORT int | s3_decode_init (s3_decode_t *_decode, cmd_ln_t *_config) |
S3DECODER_EXPORT void | s3_decode_close (s3_decode_t *_decode) |
S3DECODER_EXPORT int | s3_decode_begin_utt (s3_decode_t *_decode, char *_uttid) |
S3DECODER_EXPORT void | s3_decode_end_utt (s3_decode_t *_decode) |
S3DECODER_EXPORT int | s3_decode_process (s3_decode_t *_decode, float32 **_frames, int32 _num_frames) |
S3DECODER_EXPORT int | s3_decode_hypothesis (s3_decode_t *_decode, char **_uttid, char **_hyp_str, hyp_t ***_hyp_segs) |
S3DECODER_EXPORT dag_t * | s3_decode_word_graph (s3_decode_t *_decode) |
S3DECODER_EXPORT void | s3_decode_set_lm (s3_decode_t *_decode, const char *lmname) |
S3DECODER_EXPORT void | s3_decode_delete_lm (s3_decode_t *_decode, const char *lmname) |
S3DECODER_EXPORT void | s3_decode_read_lm (s3_decode_t *_decode, const char *lmfile, const char *lmname) |
Variables |
S3DECODER_EXPORT arg_t | S3_DECODE_ARG_DEFS [] |
header for live mode decoding API
Retrieve partial or final decoding results (hypothesis). Any hypothesis retrieved prior to the end of the utterance is called a partial hypothesis. Any hypothesis retrieved after the end of the utterance is called the final hypothesis. The hypothesis can be returned in a plain READ-ONLY string and/or an array of READ-ONLY word segments. In the plain string result, all filler and end words are filtered out as well as the pronouciation information. What is left is a very readable string representation of the decoding result. There is no such filtering in the word segment result.
Here is an example on how to use the result returned by s3_decode_hypothesis:
s3_decode_t d;
char *str, *uttid;
hyp_t **segs;
...
s3_decode_hypothesis(&d, &uttid, &str, &segs);
printf("Decoded string: %s\n", str);
for (; *segs; segs++) {
printf("Word-segment id: %i\n", (*segs)->id);
}
- Parameters:
-
_decode | Pointer to the decoder. |
_uttid | Pointer to utterance ID string. |
_hyp_str | Return pointer to a READ-ONLY string. If null, the string is not returned. |
_hyp_segs | Return pointer to a null-terminated array of word segments. If null, the array is not returned. |
- Returns:
- 0 for success. -1 for failure.
Referenced by main(), and process_thread().
Initializes a Sphinx3 decoder object (re-entrant). Internal modules, eg. search algorithms, language model, accoustic model, etc, are read from file and initialized. The decoder internal variables are set to a starting state.
This version of the Sphinx3 decoder assumes the user has externally parsed arguments using cmd_ln_parse_r() or cmd_ln_parse_file_r(). The user is responsible for calling cmd_ln_free_r() when he/she is done with the decoder.
- Parameters:
-
_decode | Pointer to the decoder. |
_config | Pointer to the command-line object returned by cmd_ln_parse_r(). |
- Returns:
- 0 for success. -1 for failure.
Referenced by main().