Package edu.cmu.sphinx.decoder.adaptation

Examples of edu.cmu.sphinx.decoder.adaptation.Stats


        return null == result ? null : new SpeechResult(result);
    }
   
    public Stats createStats(int numClasses) {
        clusters = new ClusteredDensityFileData(context.getLoader(), numClasses);
        return new Stats(context.getLoader(), clusters);
    }
View Full Code Here


        stream = TranscriberDemo.class.getResourceAsStream(
                "/edu/cmu/sphinx/demo/aligner/10001-90210-01803.wav");
       
        // Stats class is used to collect speaker-specific data
        Stats stats = recognizer.createStats(1);
        recognizer.startRecognition(stream);
        while ((result = recognizer.getResult()) != null) {
            stats.collect(result);
        }
        recognizer.stopRecognition();
       
        // Transform represents the speech profile
        Transform transform = stats.createTransform();
        recognizer.setTransform(transform);
       
        // Decode again with updated transform
        stream = TranscriberDemo.class.getResourceAsStream(
                "/edu/cmu/sphinx/demo/aligner/10001-90210-01803.wav");
View Full Code Here

        TimeFrame t;
        SpeechResult result;

        for (SpeakerCluster spk : speakers) {
            Stats stats = recognizer.createStats(1);
            ArrayList<Segment> segments = spk.getSpeakerIntervals();

            for (Segment s : segments) {
                long startTime = s.getStartTime();
                long endTime = s.getStartTime() + s.getLength();
                t = new TimeFrame(startTime, endTime);

                recognizer.startRecognition(url.openStream(), t);
                while ((result = recognizer.getResult()) != null) {
                    stats.collect(result);
                }
                recognizer.stopRecognition();
            }

            Transform profile;
            // Create the Transformation
            profile = stats.createTransform();
            recognizer.setTransform(profile);

            for (Segment seg : segments) {
                long startTime = seg.getStartTime();
                long endTime = seg.getStartTime() + seg.getLength();
View Full Code Here

TOP

Related Classes of edu.cmu.sphinx.decoder.adaptation.Stats

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.