Package edu.cmu.sphinx.linguist.acoustic

Examples of edu.cmu.sphinx.linguist.acoustic.HMMStateArc


                    // just go through the next set of successors

                    HMMStateArc[] arcs = hmmState.getSuccessors();
                    nextStates = new SearchStateArc[arcs.length];
                    for (int i = 0; i < arcs.length; i++) {
                        HMMStateArc arc = arcs[i];
                        if (arc.getHMMState().isEmitting()) {
                            // if its a self loop and the prob. matches
                            // reuse the state
                            if (arc.getHMMState() == hmmState
                                    && logInsertionProbability == arc
                                    .getLogProbability()) {
                                nextStates[i] = this;
                            } else {
                                nextStates[i] = new LexTreeHMMState(
                                        (HMMNode) getNode(), getWordHistory(),
                                        getSmearTerm(), getSmearProb(),
                                        arc.getHMMState(), logOne,
                                        arc.getLogProbability(), parentNode, collapsed);
                            }
                        } else {
                            nextStates[i] = new LexTreeNonEmittingHMMState(
                                    (HMMNode) getNode(), getWordHistory(),
                                    getSmearTerm(), getSmearProb(),
                                    arc.getHMMState(),
                                    arc.getLogProbability(), parentNode, collapsed);
                        }
                    }
                }
                putCachedArcs(nextStates);
            }
View Full Code Here


            List<HMMStateArc> list = new ArrayList<HMMStateArc>();
            float[][] transitionMatrix = hmm.getTransitionMatrix();

            for (int i = 0; i < transitionMatrix.length; i++) {
                if (transitionMatrix[state][i] > LogMath.LOG_ZERO) {
                    HMMStateArc arc = new HMMStateArc(hmm.getState(i),
                            transitionMatrix[state][i]);
                    list.add(arc);
                }
            }
            arcs = list.toArray(new HMMStateArc[list.size()]);
View Full Code Here

            while( iter.hasNext()) {
                result.add(new PhoneSearchState(iter.next(), acousticModel));
            }
            return result.toArray(new SearchStateArc[result.size()]);
        } else {
            HMMStateArc successors[] = state.getSuccessors();
            SearchStateArc[] results = new SearchStateArc[successors.length];
            for (int i = 0; i < successors.length; i++) {
                results[i] = new PhoneHmmSearchState(unit, successors[i].getHMMState(), acousticModel);
            }
            return results;
View Full Code Here

TOP

Related Classes of edu.cmu.sphinx.linguist.acoustic.HMMStateArc

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.