Skip to main content

Module dense

Module dense 

Source
Expand description

The acoustic model’s output, seen as an FST.

A neural acoustic model hands back a T × V matrix: for each of T frames, a score for each of V symbols. Decoding is the composition of that matrix with a decoding graph, so the matrix has to be an FST first.

As an FST it is a chain of T + 1 states, with V arcs from frame t to frame t + 1, one per symbol, weighted by that symbol’s score in that frame. It is an acceptor: the symbol is both input and output label.

Nothing is materialised. DenseFst borrows the matrix and computes each arc as it is asked for, so composing against it costs no copy of the acoustic scores. It corresponds to a single, unbatched item in k2’s DenseFsaVec.

Structs§

DenseArcIter
The arcs of one frame: one per column, in column order.
DenseFst
A T × V matrix of acoustic scores, read as an FST.
DenseStateIter
The states of a DenseFst, which are the frame boundaries.

Traits§

FromScore
A weight that can be built from one acoustic score.