⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hhed.tex

📁 隐马尔可夫模型源代码
💻 TEX
📖 第 1 页 / 共 3 页
字号:
The first parameter controls duplication of tied structures.  Any


macros whose type appears in string \texttt{s} are duplicated


with new names and only used in the duplicate model set.  The remaining


shared structures are common through all the model sets (original and


duplicates).


The second parameter defines the number of times the current


HMM set should be duplicated with the remaining \texttt{n} parameters


providing suffices to make the original macro identifiers unique


in each duplicated HMM set.





For instance the following script could be used to duplicate


a set of tied state models to produce gender dependent ones


with tied variances.


\begin{verbatim}


    MM "v_" { (*).state[2-4].mix[1-2].cov }


    DP "v" 2 ":m" ":f" 


\end{verbatim}


The \texttt{MM} command converts all variances into macros


(with each macro referring to only one variance).


The \texttt{DP} command then duplicates the current HMM set twice.


Each of the duplicate sets will share the tied variances with


the original set but will have new mixture means, weights and


state macros.  The new macro names will be constructed by


appending the id \texttt{":m"} or \texttt{":f"} to the original 


macro name whilst the model names have the id appended after


the base phone name (so \texttt{ax-b+d} becomes \texttt{ax-b:m+d} or


\texttt{ax-b:f+d}.





\subsubsection*{\tt FA varscale}





Computes an average within state variance vector for a given HMM set,


using statistics generated by \htool{HERest} (see {\tt LS} for loading


stats).  The average variance vector is scaled and stored in the HMM


set, any variance floor vectors present are replaced. Subsequently,


the variance floor is applied to all variances in the model set. This


can be inhibited by setting \texttt{APPLYVFLOOR} to \texttt{FALSE}.





\subsubsection*{\tt FC}





Converts all covariances in the modelset to full. This command


takes an HMM set with diagonal covariances and creates full


covariances which are initialised with the variances of the diagonal


system. The tying structure of the original system is kept intact.





\subsubsection*{\tt FV file} 





Loads one variance floor macro per stream from file. The file


containing the variance floor macros can, for example, be generated by


\htool{HCompV}. Any variance floor vectors present in the model set


are replaced. Secondly the variance floor is applied to all variances.


This can be inhibited but setting \texttt{APPLYVFLOOR} to


\texttt{FALSE}.





\subsubsection*{\tt HK hsetkind}





Converts model set from one kind to another.  Although hsetkind can


take the value PLAINHS, SHAREDHS, TIEDHS or DISCRETEHS, the HK command is


most likely to be used when building tied-mixture systems (hsetkind=TIEDHS).





\subsubsection*{\tt JO size minw}





Set the size and minimum mixture weight for subsequent


Tie (\texttt{TI}) commands applied to pdf's.  


The value of \texttt{size} sets the total number of


mixtures in the tied mixture set ({\it codebook}) and \texttt{minw}


sets a floor on the mixture weights as a multiple of \texttt{MINMIX}.


This command only applies to tying item lists of type ``p''


(see the Tie \texttt{ TI} command below).





\subsubsection*{\tt LS statsfile}





This command is used to read in the \htool{HERest} statistics file 


(see the \htool{HERest} \texttt{-s} option) stored in \texttt{statsfile}.  These


statistics are needed for certain clustering operations.


The statistics file contains the occupation count for every HMM state. 





\subsubsection*{\tt LT treesfile}





This command reads in the decision trees stored in \texttt{treesfile}.


The trees file will consist of a set of questions defining contexts


that may appear in the subsequent trees.  The trees are used to


identify either the state or the model that should be used in


a particular context.  The file would normally be produced by


\texttt{ST} after tree based clustering has been performed.





\subsubsection*{\tt MD nmix itemlist}





Decrease the number of mixture components in each pdf in the


\texttt{itemList} to \texttt{m}. This employs a stepwise greedy


merging strategy. For a given set of mixture components the pair with


minimal merging cost is found and merged. This is repeated until only


\texttt{m} mixture components are left. Any defunct mixture components


(i.e. components with a weight below \texttt{MINMIX}) are deleted


prior to this process.





Note that after application of this command a pdf in {\tt itemlist}


may consist of fewer, but not more than \texttt{m} mixture components.





As an example, the command


\begin{verbatim}


         MD 6 {*-aa+*.state[3].mix}


\end{verbatim}


would decrease the number of mixture components in state 3 of all


triphones of \texttt{aa} to 6.





\subsubsection*{\tt MM macro itemList}





This command makes each item (I=1..N) in \texttt{itemList} into a 


macro with name \texttt{nameI} and a usage of one.  This command


can prevent unnecessary duplication of structures when HMMs


are cloned or duplicated.





\subsubsection*{\tt MT triList newTriList}





Make  a set of triphones by merging the currently loaded set of


biphones.  This is a very specialised command.  All currently


loaded HMMs must have 3 emitting states and be either left


or right context-dependent biphones.  The list of HMMs stored


in \texttt{triList} should contain one or more triphones.  For


each triphone in \texttt{triList} of the form \texttt{X-Y+Z}, there


must be currently loaded biphones \texttt{X-Y} and \texttt{Y+Z}.


A new triphone \texttt{X-Y+Z} is then synthesised by first cloning


\texttt{Y+Z} and then replacing the state information for the


initial emitting state by the state information for the initial


emitting state of \texttt{X-Y}.  Note that the underlying physical


names of the biphones used to create the triphones are recorded


so that where possible, triphones generated from tied biphones


are also tied.  On completion, the new list of triphones including


aliases is written to the file \texttt{newTriList}.





\subsubsection*{\tt MU m itemList(p)}





Increase the number of non-defunct mixture components


in each pdf in the \texttt{itemList} to \texttt{m} (when \texttt{m} 


is just a number) or by \texttt{m} (when \texttt{m} is a number 


preceeded by a \texttt{+} sign.  A defunct mixture


is one for which the weight has fallen below \texttt{MINMIX}. This command


works in two steps.  Firstly, the weight of each mixture


in each pdf is checked.  If any defunct mixtures are discovered, 


then each is successively replaced by a non-defunct


mixture component until either the required total number of non-defunct


mixtures is reached or there are no defunct mixtures left.


This replacement works by first deleting the defunct mixture


and then finding the mixture with the largest weight and splitting


it.


The split operation is as follows.  The weight of the mixture


component is first halved and then the mixture is cloned.  The


two identical mean vectors are then perturbed by adding $0.2$


standard deviations to one and subtracting the same amount


from the other.





In the second step, the mixture component with the largest


weight is split as above.  This is repeated until the required


number of mixture components are obtained.


Whenever, a mixture is split, a count is incremented  for that mixture


so that splitting occurs evenly across the mixtures.  Furthermore,


a mixture whose {\it gconst} value falls more than four standard


deviations below the mean is not split.





As an example, the command


\begin{verbatim}


         MU 6 {*-aa+*.state[3].mix}


\end{verbatim}


would increase the number of mixture components in state 3


of all triphones of \texttt{aa} to 6.





\subsubsection*{\tt NC N macro itemList(s)}





N-cluster the states listed in the 


\texttt{itemList} and tie each cluster \texttt{i} as macro \texttt{macroi}


where \texttt{i} is 1,2,3,\ldots,\texttt{N}.


The set of states in the \texttt{itemList} are divided into \texttt{N}


clusters using the following furthest neighbour hierarchical


cluster algorithm:


\begin{verbatim}


         create 1 cluster for each state;


         n = number of clusters;


         while (n>N) {


            find i and j for which g(i,j) is minimum;


            merge clusters i and j;


         }


\end{verbatim}


Here \texttt{g(i,j)} is the inter-group distance between


clusters \texttt{i} and \texttt{j} defined as the maximum


distance between any state in cluster \texttt{i} and any state


in cluster \texttt{j}.  The calculation of the inter-state


distance depends on the type of HMMs involved.  Single


mixture Gaussians use


\begin{equation}


  d(i,j) = \frac{1}{S} \sum_{s=1}^S


        \left[  


           \frac{1}{V_s} \sum_{k=1}^{V_s}


                 \frac{(\bm{\mu}_{isk} - \bm{\mu}_{jsk})^2}{


                         \bm{\sigma}_{isk}\bm{\sigma}_{jsk}}


        \right]^{\frac{1}{2}}


\end{equation}


where $V_s$ is the dimensionality of stream $s$.  Fully tied


mixture systems (ie \texttt{TIEDHS}) use


\begin{equation}


  d(i,j) = \frac{1}{S} \sum_{s=1}^S


        \left[  


           \frac{1}{M_s} \sum_{m=1}^{M_s}


                (c_{ism} - c_{jsm})^2


        \right]^{\frac{1}{2}}


\end{equation}


and all others use


\begin{equation}


  d(i,j) = - \frac{1}{S} \sum_{s=1}^S


         \frac{1}{M_s} \sum_{m=1}^{M_s}


          \log[b_{js}(\bm{\mu}_{ism})] + \log[b_{is}(\bm{\mu}_{jsm})]


\end{equation}


where $b_{js}(\bm{x})$ is as defined in equation~\ref{e:cdpdf} for


the continuous case and equation~\ref{e:ddpdf} for the discrete case.  The actual


tying of the states in each cluster is performed exactly as for


the Tie (\texttt{TI}) command below.  The macro for the \texttt{i}'th


tied cluster is called \texttt{macroi}.





\subsubsection*{\tt PR }





This command takes a model set that has been estimated with an HLDA transform,


but storead as a semi-tied transform rather than an input transform and 


transforms it into a model-set with the projected number of dimensions and


an input transform.





\subsubsection*{\tt PS nstates power [numiters]   }





This command sets the number of Gaussians in each HMM state


proportional to a power of the number of frames available for training it.  The


number of frames is obtained from a ``stats'' file output by \htool{HERest},


which is loaded by the \texttt{LS} command.  Typical usage might be:


\begin{verbatim}


 LS <statsfile> 


 PS 16 0.2 


\end{verbatim}


in order to acheive an average of 16 Gaussians per state with a power


of 0.2.  





It is always advisable when increasing the number of Gaussians in states to


increase the number by small increments and re-estimate HMMs using


\htool{HERest} once or more in between.  It may be difficult to avoid a


large increase in number of Gaussians in particular states when moving from


a HMM set with a constant number of Gaussians per state to one controlled


by a power law.  Therefore the PS command has a facility for increasing


the number of Gaussians gradually where the target is larger than the


initial number of Gaussians, so that HERest can be run in between.  In this


example, one could use the \htool{HHEd} command \texttt{PS}~16~0.2~3, run


\htool{HERest}, use the command \texttt{PS}~16~0.2~2, run \htool{HERest},


and then run \texttt{PS}~16~0.2~1 before the final re-estimation with


\htool{HERest}.  The last argument is the number of iterations remaining.


A fairly similar effect could be obtained by increasing the power linearly


from zero.








\subsubsection*{\tt QS name itemList(h)}





Define a question \texttt{name} which is true for all the models in


\texttt{itemList}.  These questions can subsequently be used as part 


of the decision tree based clustering procedure (see \texttt{TB}


command below).





\subsubsection*{\tt RC N identifier [itemlist]}





This command is used to grow a regression class tree for adaptation


purposes. A regression class tree is grown with


\texttt{N} terminal or leaf nodes, using the centroid splitting algorithm


with a Euclidean distance measure to cluster the model set's mixture


components. Hence each leaf node specifies a particular mixture


component cluster. The regression class tree is saved with the macro


identifier \texttt{identifier\_N}. Each Gaussian component is also


labelled with a regression class number (corresponding to the leaf


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -