Package edu.cmu.sphinx.linguist.acoustic.tiedstate.HTK

Examples of edu.cmu.sphinx.linguist.acoustic.tiedstate.HTK.GMMDiag


        int getNumStates() {
            return hmmsHTK.getNstates();
        }

        int getGMMSize() {
            GMMDiag gmm = hmmsHTK.gmms.get(0);
            return gmm.getNgauss();
        }
View Full Code Here


            GMMDiag gmm = hmmsHTK.gmms.get(0);
            return gmm.getNgauss();
        }

        int getNcoefs() {
            GMMDiag gmm = hmmsHTK.gmms.get(0);
            return gmm.getNcoefs();
        }
View Full Code Here

            pool.setFeature(NUM_SENONES, numStates);
            pool.setFeature(NUM_STREAMS, numStreams);
            pool.setFeature(NUM_GAUSSIANS_PER_STATE, numGaussiansPerState);
            int ncoefs = getNcoefs();
            for (int i = 0; i < numStates; i++) {
                GMMDiag gmm = hmmsHTK.gmms.get(i);
                for (int j = 0; j < numGaussiansPerState; j++) {
                    float[] density = new float[ncoefs];
                    for (int k = 0; k < ncoefs; k++) {
                        density[k] = gmm.getMean(j, k);
                    }
                    int id = i * numGaussiansPerState + j;
                    // the order of the means is the order in the HMMSet.gmms
                    // vector which is the order of appearance in the MMF file
                    pool.put(id, density);
View Full Code Here

            pool.setFeature(NUM_SENONES, numStates);
            pool.setFeature(NUM_STREAMS, numStreams);
            pool.setFeature(NUM_GAUSSIANS_PER_STATE, numGaussiansPerState);
            int ncoefs = getNcoefs();
            for (int i = 0; i < numStates; i++) {
                GMMDiag gmm = hmmsHTK.gmms.get(i);
                for (int j = 0; j < numGaussiansPerState; j++) {
                    float[] vars = new float[ncoefs];
                    for (int k = 0; k < ncoefs; k++) {
                        // TODO: check: shall we put inverse vars here ?
                        vars[k] = gmm.getVar(j, k);
                    }
                    Utilities.floorData(vars, varianceFloor);
                    int id = i * numGaussiansPerState + j;
                    // the order of the vars is the order in the HMMSet.gmms
                    // vector which is the order of appearance in the MMF file
View Full Code Here

            int numGaussiansPerState = getGMMSize();
            pool.setFeature(NUM_SENONES, numStates);
            pool.setFeature(NUM_STREAMS, numStreams);
            pool.setFeature(NUM_GAUSSIANS_PER_STATE, numGaussiansPerState);
            for (int i = 0; i < numStates; i++) {
                GMMDiag gmm = hmmsHTK.gmms.get(i);
                float[] logWeights = new float[numGaussiansPerState];
                for (int j = 0; j < numGaussiansPerState; j++) {
                    logWeights[j] = gmm.getWeight(j);
                }
                Utilities.floorData(logWeights, mixtureWeightFloor);
                logMath.linearToLog(logWeights);
                // the order of the weights is the order in the HMMSet.gmms
                // vector which is the order of appearance in the MMF file
View Full Code Here

TOP

Related Classes of edu.cmu.sphinx.linguist.acoustic.tiedstate.HTK.GMMDiag

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.