📄 hhed.tex
字号:
%/* ----------------------------------------------------------- */%/* */%/* ___ */%/* |_| | |_/ SPEECH */%/* | | | | \ RECOGNITION */%/* ========= SOFTWARE */ %/* */%/* */%/* ----------------------------------------------------------- */%/* Copyright: Microsoft Corporation */%/* 1995-2000 Redmond, Washington USA */%/* http://www.microsoft.com */%/* */%/* Use of this software is governed by a License Agreement */%/* ** See the file License for the Conditions of Use ** */%/* ** This banner notice must not be removed ** */%/* */%/* ----------------------------------------------------------- */%% HTKBook - Steve Young and Julian Odell 20/05/97%\newpage\mysect{HHEd}{HHEd}\subsection{Function}\index{hhed@\htool{HHEd}|(}\htool{HHEd} is a script driven editor for manipulating sets of HMM definitions.Its basic operation is to load in a set of HMMs, apply a sequence of editoperations and then output the transformed set. \htool{HHEd} is mainly used forapplying tyings across selected HMM parameters. It also has facilities forcloning HMMs, clustering states and editing HMM structures.Many \htool{HHEd} commands operate on sets of similar items selected from theset of currently loaded HMMs. For example, it is possible to define a set ofall final states of all vowel models, or all mean vectors of all mixturecomponents within the model X, etc. Sets such as these are defined by itemlists using the syntax rules given below. In all commands, all of the items inthe set defined by an item list must be of the same type where the possibletypes are\begin{tabbing}+++++++ \= ++ \= ++++++++++++++++ \= ++ \= \kill\> s \> -- state \> t \> -- transition matrix \\\> p \> -- pdf \> w \> -- stream weights \\\> m \> -- mixture component \> d \> -- duration parameters \\\> u \> -- mean vector \> x \> -- transform matrix \\\> v \> -- variance vector \> i \> -- inverse covariance matrix \\\> h \> -- HMM definition\end{tabbing}\noindentMost of the above correspond directly to the tie points shown inFig~\href{f:hierarch}. There is just one exception. The type ``p''corresponds to a pdf (ie a sum of Gaussian mixtures). Pdf's cannotbe tied, however, they can be named in a Tie (\texttt{TI}) command(see below) in which case, the effect is to join all of the containedmixture components into one pool of mixtures and then all of themixtures in the pool are shared across all pdf's. This allowsconventional {\it tied-mixture} or {\it semi-continuous} HMM systemsto be constructed.The syntax rules for item lists are as follows. An item listconsists of a comma separated list of item sets.{\sf\begin{tabbing}++++++ \= ++++++++ \= ++ \= ++++++++++++ \= \kill\> itemList\> = \> ``\{'' itemSet \{ ``,'' itemSet \} ``\}'' \end{tabbing}}\noindentEach {\sf itemSet} consists of the name of oneor more HMMs (or a patternrepresenting a set of HMMs) followed by a specificationwhich represents a set of paths down the parameter hierarchy each terminating at one of the required parameter items.{\sf\begin{tabbing}++++++ \= ++++++++ \= ++ \= ++++++++++++ \= \kill\> itemSet \> = \> hmmName . [``transP'' $|$ ``state'' state ]\\\> hmmName \> = \> ident $|$ identList \\\> identList\> = \> ``('' ident \{ ``,'' ident \} ``)'' \\\> ident \> = \> $<$ char $|$ metachar $>$ \\\> metachar \> = \> ``?'' $|$ ``$\star$''\end{tabbing}}\noindentA {\sf hmmName} consists of a single {\sf ident} ora comma separated list of {\sf ident}'s. The following examplesare all valid {\sf hmmName}'s:\begin{verbatim} aa three model001 (aa,iy,ah,uh) (one,two,three)\end{verbatim}In addition, an {\sf ident} can contain the metacharacter``?'' which matches any single character and the metacharacter``$\star$'' which matches a string of zero or more characters.For example, the item list\begin{verbatim} {*-aa+*.transP}\end{verbatim}would represent the set of transition matrices of all loadedtriphone variations of \texttt{aa}.Items within states require the state indices to be specified{\sf\begin{tabbing}++++++ \= ++++++++ \= ++ \= ++++++++++++ \= \kill\> state \> = \> index [``.'' stateComp ] \\\> index \> = \> ``['' intRange \{ ``,'' intRange \} ``]'' \\\> intRange \> = \> integer [ ``-'' integer ]\end{tabbing}}For example, the item list\begin{verbatim} {*.state[1,3-5,9]}\end{verbatim}represents the set of all states 1, 3 to 5 inclusive and 9 of allcurrently loaded HMMs. Items within states include durationalparameters, stream weights, pdf's and all items within mixtures{\sf\begin{tabbing}++++++ \= ++++++++ \= ++ \= ++++++++++++ \= \kill\> stateComp \> = \> ``dur'' $|$ ``weights'' $|$ [ `` stream'' index ] ``.'' ``mix'' [ mix ]\end{tabbing}}For example, \begin{verbatim} {(aa,ah,ax).state[2].dur}\end{verbatim}denotes the set of durational parameter vectors from state 2 of theHMMs \texttt{aa}, \texttt{ah} and \texttt{ax}. Similarly, \begin{verbatim} {*.state[2-4].weights}\end{verbatim}denotes the set of stream weights for states 2 to 4 of all currentlyloaded HMMs. The specification of pdf's may optionally include alist of the relevant streams, if omitted, stream 1 is assumed.For example,\begin{verbatim} {three.state[3].mix}\end{verbatim}and\begin{verbatim} {three.state[3].stream[1].mix}\end{verbatim}both denote a list of the single pdf belonging to stream 1 of state 3 of the HMM \texttt{three}.Within a pdf, the possible item types are mixture components,mean vectors, and the various possible forms of covarianceparameters{\sf\begin{tabbing}++++++ \= ++++++++ \= ++ \= ++++++++++++ \= \kill\> mix \> = \> index [ ``.'' ( ``mean'' $|$ ``cov'' ) ]\end{tabbing}}For example,\begin{verbatim} {*.state[2].mix[1-3]}\end{verbatim}denotes the set of mixture components 1 to 3 from state 2 of allcurrently loaded HMMs and\begin{verbatim} {(one,two).state[4].stream[3].mix[1].mean}\end{verbatim}denotes the set of mean vectors from mixture component 1, stream 3,state 4 of the HMMs \texttt{one} and \texttt{two}. When {\sf cov}is specified, the type of the covariance item referred to is determined from the \texttt{CovKind} of the loaded models. Thus,for diagonal covariance models, the item list\begin{verbatim} {*.state[2-4].mix[1].cov}\end{verbatim}would denote the set of variance vectors for mixture 1, states 2 to 4of all loaded HMMs.Note finally, that it is not an error to specify non-existent models,states, mixtures, etc. All item list specifications are regardedas patterns which are matched against the currently loaded set ofmodels. All and only those items which match are included inthe set. However, both a null result and a set of items of mixedtype do result in errors.All \htool{HHEd} commands consist of a 2 character command name followedby zero or more arguments. In the following descriptions, itemlists are shown as \texttt{itemList(c)} where the character c denotes thetype of item expected by that command. If this type indicator ismissing then the command works for all item types.The \htool{HHEd} commands are as follows\subsubsection{\texttt{AT i j prob itemList(t)}}Add a transition from state \texttt{i} to state \texttt{j} with probability\texttt{prob} for all transition matrices in \texttt{itemList}. The remainingtransitions out of state \texttt{i} are rescaled so that $\sum_k a_{ik} = 1 $.For example,\begin{verbatim} AT 1 3 0.1 {*.transP}\end{verbatim}would add a skip transition to all loaded models from state 1 to state 3with probability 0.1.\subsubsection*{\tt AU hmmList}Use a set of decision trees to create a new set of models specifiedby the \texttt{hmmList}. The decision trees may be made as a resultof either the \texttt{TB} or \texttt{LT} command. Each model in \texttt{hmmList} is constructed in the following manner.If a model with the same logical name already exists in thecurrent HMM set this is used unchanged, otherwise the model issynthesised from the decision trees. If the trees cluster at the model level the synthesis results in a logical model sharing thephysical model from the tree that matches the new context. Ifthe clustering was performed at the state level a prototype model(an example of the same phone model occurring in a different context)is found and a new HMM is constructed that shares the transitionmatrix with the prototype model but consists of tied states selectedusing the decision tree.\subsubsection*{\tt CL hmmList}Clone a HMM list. The file \texttt{hmmList} should hold a list of HMMsall of whose logical names are either the same as, or are context-dependentversions of the currently loaded set of HMMs. For each name in \texttt{hmmList},the corresponding HMM in the loaded set is cloned. On completion, thecurrently loaded set is discarded and replaced by the new set. For example,if the file \texttt{mylist} contained\begin{verbatim} A-A+A A-A+B B-A+A B-B+B B-B+A\end{verbatim}and the currently loaded HMMs were just \texttt{A} and \texttt{B}, then\texttt{A} would be cloned 3 times to give the models \texttt{A-A+A},\texttt{A-A+B} and \texttt{B-A+A}, and \texttt{B} would be cloned 2 timesto give \texttt{B-B+B} and \texttt{B-B+A}. On completion, the originaldefinitions for \texttt{A} and \texttt{B} would be deleted (they couldbe retained by including them in the new \texttt{hmmList}).\subsubsection*{\tt CO newList}Compact a set of HMMs. The effect of this command is toscan the currently loaded set of HMMs and identify all identicaldefinitions. The physical name of the first model in each identicalset is then assigned to all models in that set and allmodel definitions are replaced by a pointer to the firstmodel definition. On completion,a new list of HMMs which includes the new model tyings iswritten out to file \texttt{newList}. For example, suppose thatmodels \texttt{A}, \texttt{B}, \texttt{C} and \texttt{D} were currentlyloaded and \texttt{A} and \texttt{B} were identical. Then the command\begin{verbatim} CO tlist\end{verbatim}would tie HMMs \texttt{A} and \texttt{B}, set the physical name of \texttt{B} to \texttt{A} and output thenew HMM list\begin{verbatim} A B A C D\end{verbatim}to the file \texttt{tlist}. This command is used mainly after performing a sequence of parameter tying commands.\subsubsection*{\tt DP s n id ...}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -