Package edu.cmu.sphinx.frontend

Examples of edu.cmu.sphinx.frontend.FloatData


        float var = 3;

        MixtureComponent gaussian = new MixtureComponent(new float[]{mean}, new float[]{var});

        for (float curX = minX; curX <= maxX; curX += resolution) {
            double gauLogScore = gaussian.getScore(new FloatData(new float[]{curX}, 16000, 0));

            double manualScore = (1 / sqrt(var * 2 * PI)) * exp((-0.5 / var) * (curX - mean) * (curX - mean));
            double gauScore = LogMath.getLogMath().logToLinear((float) gauLogScore);

            Assert.assertEquals(manualScore, gauScore, 1E-5);
View Full Code Here


    if (token == null)
      throw new Exception("Best token not found!");

    do {
      FloatData feature = (FloatData) token.getData();
      SearchState ss = token.getSearchState();

      if (!(ss instanceof HMMSearchState && ss.isEmitting())) {
        token = token.getPredecessor();
        continue;
View Full Code Here

        for (int i = 0; i < values.length; i++) {
            floatData[i] = (float) values[i];
        }
//        System.arraycopy(data.getValues(), 0, floatData, 0, numSamples);

        return new FloatData(floatData, data.getSampleRate(), data.getFirstSampleNumber());
    }
View Full Code Here

TOP

Related Classes of edu.cmu.sphinx.frontend.FloatData

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.