PocketSphinx  5.0.0
A small speech recognizer
Public Member Functions | List of all members
ps_latlink_t Struct Reference

Link between DAG nodes. More...

#include <pocketsphinx/lattice.h>

Public Member Functions

POCKETSPHINX_EXPORT int ps_latlink_times (ps_latlink_t *link, int16 *out_sf)
 
POCKETSPHINX_EXPORT ps_latnode_tps_latlink_nodes (ps_latlink_t *link, ps_latnode_t **out_src)
 
POCKETSPHINX_EXPORT const char * ps_latlink_word (ps_lattice_t *dag, ps_latlink_t *link)
 
POCKETSPHINX_EXPORT const char * ps_latlink_baseword (ps_lattice_t *dag, ps_latlink_t *link)
 
POCKETSPHINX_EXPORT ps_latlink_tps_latlink_pred (ps_latlink_t *link)
 
POCKETSPHINX_EXPORT int32 ps_latlink_prob (ps_lattice_t *dag, ps_latlink_t *link, int32 *out_ascr)
 

Detailed Description

Link between DAG nodes.

A link corresponds to a single hypothesized instance of a word with a given start and end point.

Member Function Documentation

◆ ps_latlink_times()

POCKETSPHINX_EXPORT int ps_latlink_times ( ps_latlink_t link,
int16 *  out_sf 
)

Get start and end times from a lattice link.

Note
these are inclusive - i.e. the last frame of this word is ef, not ef-1.
Parameters
linkLink inquired about.
out_sfOutput: (optional) start frame of this link.
Returns
End frame of this link.

◆ ps_latlink_nodes()

POCKETSPHINX_EXPORT ps_latnode_t * ps_latlink_nodes ( ps_latlink_t link,
ps_latnode_t **  out_src 
)

Get destination and source nodes from a lattice link

Parameters
linkLink inquired about
out_srcOutput: (optional) source node.
Returns
destination node

◆ ps_latlink_word()

POCKETSPHINX_EXPORT const char * ps_latlink_word ( ps_lattice_t dag,
ps_latlink_t link 
)

Get word string from a lattice link.

Parameters
dagLattice to which node belongs.
linkLink inquired about
Returns
Word string for this link (possibly a pronunciation variant).

◆ ps_latlink_baseword()

POCKETSPHINX_EXPORT const char * ps_latlink_baseword ( ps_lattice_t dag,
ps_latlink_t link 
)

Get base word string from a lattice link.

Parameters
dagLattice to which node belongs.
linkLink inquired about
Returns
Base word string for this link

◆ ps_latlink_pred()

POCKETSPHINX_EXPORT ps_latlink_t * ps_latlink_pred ( ps_latlink_t link)

Get predecessor link in best path.

Parameters
linkLink inquired about
Returns
Best previous link from bestpath search, if any. Otherwise NULL

◆ ps_latlink_prob()

POCKETSPHINX_EXPORT int32 ps_latlink_prob ( ps_lattice_t dag,
ps_latlink_t link,
int32 *  out_ascr 
)

Get acoustic score and posterior probability from a lattice link.

Parameters
dagLattice to which node belongs.
linkLink inquired about
out_ascrOutput: (optional) acoustic score.
Returns
Posterior probability for this link. Log is expressed in the log-base used in the decoder. To convert to linear floating-point, use logmath_exp(ps_lattice_get_logmath(), pprob).

The documentation for this struct was generated from the following file: