<sect1 id='viterbi-manual'> <title><command>viterbi</command> <emphasis>Combine n-gram model and likelihoods to estimate posterior probabilities</emphasis></title> <toc depth='1'></toc> <para> </para> <sect2> <title>Synopsis</title> <para> </para> <!-- /amd/projects/festival/versions/v_mpiro/speech_tools_linux/bin/viterbi -sgml_synopsis --> <para> <cmdsynopsis><command>viterbi</command>[observations file] -o [output file]<arg>-ngram <replaceable>string</replaceable></arg> <arg>-given <replaceable>string</replaceable></arg> <arg>-vocab <replaceable>string</replaceable></arg> <arg>-ob_type <replaceable>string</replaceable></arg> <arg>-lm_floor <replaceable>float</replaceable></arg> <arg>-lm_scale <replaceable>float</replaceable></arg> <arg>-ob_floor <replaceable>float</replaceable></arg> <arg>-ob_scale <replaceable>float</replaceable></arg> <arg>-prev_tag <replaceable>string</replaceable></arg> <arg>-prev_prev_tag <replaceable>string</replaceable></arg> <arg>-last_tag <replaceable>string</replaceable></arg> <arg>-default_tags </arg> <arg>-observes2 <replaceable>string</replaceable></arg> <arg>-ob_floor2 <replaceable>float</replaceable></arg> <arg>-ob_scale2 <replaceable>float</replaceable></arg> <arg>-ob_prune <replaceable>float</replaceable></arg> <arg>-n_prune <replaceable>int</replaceable></arg> <arg>-prune <replaceable>float</replaceable></arg> <arg>-trace </arg> </cmdsynopsis> </para> <!-- DONE /amd/projects/festival/versions/v_mpiro/speech_tools_linux/bin/viterbi -sgml_synopsis --> <para> viterbi is a simple time-synchronous Viterbi decoder. It finds the most likely sequence of items drawn from a fixed vocabulary, given frame-by-frame observation probabilites for each item in that vocabulary, and a ngram grammar. Possible uses include: <itemizedlist> <listitem><para>Simple speech recogniser back end</para></listitem> </itemizedlist> viterbi can optionally use two sets of frame-by-frame observation probabilites in a weighted-sum fashion. Also, the ngram language model is not restricted to the conventional sliding window type in which the previous n-1 items are the ngram context. Items in the ngram context at each frame may be given. In this case, the user must provide a file containing the ngram context: one (n-1) tuple per line. To include items from the partial Viterbi path so far (i.e. found at recognition time, not given) the special notation <-N> is used where N indicates the distance back to the item required. For example <-1> would indicate the item on the partial Viterbi path at the last frame. See \Ref{Examples}. <formalpara> <para><title>Pruning</title></para> <para> Three types of pruning are available to reduce the size of the search space and therefore speed up the search: <itemizedlist> <listitem><para>Observation pruning</para></listitem> <listitem><para>Top-N pruning at each frame</para></listitem> <listitem><para>Fixed width beam pruning</para></listitem> </itemizedlist> </para> </formalpara> </para> </sect2> <sect2> <title>Options</title> <para> </para> <!-- /amd/projects/festival/versions/v_mpiro/speech_tools_linux/bin/viterbi -sgml_options --> <para> <variablelist> <varlistentry><term>-ngram</term> <LISTITEM><PARA> <replaceable>string</replaceable> Grammar file, required </PARA></LISTITEM> </varlistentry> <varlistentry><term>-given</term> <LISTITEM><PARA> <replaceable>string</replaceable> ngram left contexts, per frame </PARA></LISTITEM> </varlistentry> <varlistentry><term>-vocab</term> <LISTITEM><PARA> <replaceable>string</replaceable> File with names of vocabulary, this must be same number as width of observations, required </PARA></LISTITEM> </varlistentry> <varlistentry><term>-ob_type</term> <LISTITEM><PARA> <replaceable>string</replaceable> Observation type : likelihood .... and change doc"probs" or "logs" (default is "logs") Floor values and scaling (scaling is applied after floor value) </PARA></LISTITEM> </varlistentry> <varlistentry><term>-lm_floor</term> <LISTITEM><PARA> <replaceable>float</replaceable> LM floor probability </PARA></LISTITEM> </varlistentry> <varlistentry><term>-lm_scale</term> <LISTITEM><PARA> <replaceable>float</replaceable> LM scale factor factor (applied to log prob) </PARA></LISTITEM> </varlistentry> <varlistentry><term>-ob_floor</term> <LISTITEM><PARA> <replaceable>float</replaceable> Observations floor probability </PARA></LISTITEM> </varlistentry> <varlistentry><term>-ob_scale</term> <LISTITEM><PARA> <replaceable>float</replaceable> Observation scale factor (applied to prob or log prob, depending on -ob_type) </PARA></LISTITEM> </varlistentry> <varlistentry><term>-prev_tag</term> <LISTITEM><PARA> <replaceable>string</replaceable> tag before sentence start </PARA></LISTITEM> </varlistentry> <varlistentry><term>-prev_prev_tag</term> <LISTITEM><PARA> <replaceable>string</replaceable> all words before 'prev_tag' </PARA></LISTITEM> </varlistentry> <varlistentry><term>-last_tag</term> <LISTITEM><PARA> <replaceable>string</replaceable> after sentence end </PARA></LISTITEM> </varlistentry> <varlistentry><term>-default_tags</term> <LISTITEM><PARA> use default tags of !ENTER,!EXIT and !EXIT respectively </PARA></LISTITEM> </varlistentry> <varlistentry><term>-observes2</term> <LISTITEM><PARA> <replaceable>string</replaceable> second observations (overlays first, ob_type must be same) </PARA></LISTITEM> </varlistentry> <varlistentry><term>-ob_floor2</term> <LISTITEM><PARA> <replaceable>float</replaceable> </PARA></LISTITEM> </varlistentry> <varlistentry><term>-ob_scale2</term> <LISTITEM><PARA> <replaceable>float</replaceable> </PARA></LISTITEM> </varlistentry> <varlistentry><term>-ob_prune</term> <LISTITEM><PARA> <replaceable>float</replaceable> observation pruning beam width (log) probability </PARA></LISTITEM> </varlistentry> <varlistentry><term>-n_prune</term> <LISTITEM><PARA> <replaceable>int</replaceable> top-n pruning of observations </PARA></LISTITEM> </varlistentry> <varlistentry><term>-prune</term> <LISTITEM><PARA> <replaceable>float</replaceable> pruning beam width (log) probability </PARA></LISTITEM> </varlistentry> <varlistentry><term>-trace</term> <LISTITEM><PARA> show details of search as it proceeds </PARA></LISTITEM> </varlistentry> </variablelist> </para> <!-- DONE /amd/projects/festival/versions/v_mpiro/speech_tools_linux/bin/viterbi -sgml_options --> </sect2> <sect2> <title>Examples</title> <para> Example 'given' file (items f and g are in the vocabulary), the ngram is a 4-gram. <para> <screen> <-2> g g <-1> g f <-1> f g <-2> g g <-3> g g <-1> g f </screen> </para> </para> </sect2> </sect1>