Portabilityportable
Stabilityexperimental
Maintainerwww.ailab.tj.chiba-u.jp/~shinot

DcdComps

Contents

Description

This module contains definitions of pipeline components for speech decoding. This is the mainbody of the husky decoder.

Synopsis

Decoding configuration

data DcdConfig

A holder of a set of decoding parameters

Instances

Eq DcdConfig 
Show DcdConfig 

readConfig

Arguments

:: String

A name of configuration file

-> IO DcdConfig

configuration

Takes a file name of a configuration file for decoding and reads it. Each line of the file specifies a name-value pair: name=val. The parameters include insPenalty, lmWeight, band, and beam.

configPsr

Arguments

:: DcdConfig

Default value

-> String

String to parse

-> DcdConfig

Updated value

Parse a string describing parameters. Returns a DcdConfig where one of the data fields is updated following the specification in the string.

Main decoding functions

decodeForward

Arguments

:: DcdConfig

Decoding configuration.

-> WFST

WFST definitions.

-> Vector GMixture

A set of Gaussian mixture definitions of HMM states.

-> [FeaVector]

A time series of a feature vector.

-> [PathList]

A time series of a set of frame hypotheses.

Performs Viterbi forward pass for speech decoding.

progressiveBacktrack

Arguments

:: Int

Interval to perform partial backtracking. Specified in frames.

-> Int

State ID of the final WFST state.

-> [PathList]

A time series of a set of frame hypotheses.

-> [Arc]

A time series of an arc that has been determined. i.e. recognition results.

Performs progressive backtracking for every specified interval frames. Determined arcs are output progressively without waiting for the end of the input. Large interval results in coarse output timing and small one results in large computational overhed for frequent partial backtracking.

Sub functions

wfstExpandFrame

Arguments

:: WFST

WFST definitions

-> Vector GMixture

A set of Gaussian mixture definitions of HMM states.

-> [FeaVector]

A time series of a feature vector.

-> [StateScores]

A time series of a set of candidate states with their accumulated scores.

-> [PathList]

A time series of a set of frame hypotheses obtained by expanding the candidate states.

Expands candidate states at each time frame. Epsilon transitions are not expanded.

wfstExpandEps

Arguments

:: WFST

WFST definitions

-> [PathList]

A time series of a set of frame hypotheses.

-> [(PathList, StateScores)]

A time series of a pair of a set of frame hypotheses and a set of candidate states with accumulated scores. The states are end nodes of the frame hypotheses.

Expands a set of frame hypotheses by epsilon transitions.

pruneHypotheses

Arguments

:: DcdConfig

Decoding configuration.

-> [StateScores]

A time series of a set of candidate states.

-> [StateScores]

Pruned results.

Prune hypotheses

candidateStates

Arguments

:: DcdConfig

Decoding configuration.

-> WFST

WFST definitions

-> [StateScores]

A time series of a set of candidate states.

-> [StateScores]

A shifted time series of a set of candidate states.

Delays (shifts) a time series of a set of candidate states by one frame. The first element is a set of candidate states obtained by expanding the initial WFST state by epsilon transitions.

connectedHyps

Arguments

:: [PathList]

A time series of a set of frame hypotheses.

-> [PathList]

A squeezed time series of a set of frame hypotheses.

Discards non-connected paths. The input time series is supposed to represent a partial lattice in reversed time order where the first element is the newest. The frame hypotheses that do not have a path to one of the first frame hypotheses (i.e. dead hypotheses) are removed.

chunkLattice :: Int -> [PathList] -> [[PathList]]

Chunks a time series of a set of frame hypotheses. A time series of a chunked time series of a set of frame hypotheses is returned. Ex. [1 2 3 4 5 6 7 8] -> [[1 2 3] [4 5 6] [7 8 9]].

latConnectionFilter

Arguments

:: [[PathList]]

A time series of a chunked time series of a set of frame hypotheses.

-> [[PathList]]

A squeezed time series of a chunked time series of a set of frame hypotheses.

Connection filtering. Applies connectedHyps at each element.

pileUpHyps

Arguments

:: Int

The WFST final state

-> [[PathList]]

A time series of a new chunked time series of a set of frame hypotheses.

-> [[PathList]]

A time series of a remaining chunked time series of a set of frame hypotheses.

-> [[PathList]]

A time series of a concatenated chunked time series of a set of frame hypotheses.

Piles up non-determined hypotheses. Takes two time serieses of a chunked time series of a set of frame hypotheses, and connects them at each element. If the first time series is empty, then a dummy final-to-final arc is attached.

harvestHyp

Arguments

:: [[PathList]]

A time series of a chunked time series of a set of frame hypotheses.

-> [([PathList], [PathList])]

A time series of a pair of two chunked time serieses of a set of frame hypotheses.

Harvests determined hypothesis. The output is a time series of a pair of two chunked time serieses of a set of frame hypotheses, where the first element is the determined arc sequence and the second element is the remains.