Package edu.cmu.sphinx.frontend

Examples of edu.cmu.sphinx.frontend.DataStartSignal


    @Test
    public void testLongInput() throws DataProcessingException {
        int sampleRate = 1000;

        input.add(new DataStartSignal(sampleRate));

        input.addAll(createDataInput(1000, 1000, sampleRate, 0)); // create one second of data sampled with 1kHz
        input.add(new DataEndSignal(0));

        Assert.assertTrue(hasIncreasingOrder(collectOutput(100), 1000));
View Full Code Here


    @Test
    public void testUsualInput() throws DataProcessingException {
        int sampleRate = 1000;

        input.add(new DataStartSignal(sampleRate));

        input.addAll(createDataInput(600, 120, sampleRate, 0));
        input.add(new DataEndSignal(0));

        List<Data> output = collectOutput(100);
View Full Code Here

    @Test
    public void skipLastSamples() throws DataProcessingException {
        int sampleRate = 1000;

        input.add(new DataStartSignal(sampleRate));
        input.addAll(createDataInput(500, 500, sampleRate, 0));
        input.addAll(createDataInput(300, 300, sampleRate, 500));
        input.add(new DataEndSignal(0));

        List<Data> output = collectOutput(250);
View Full Code Here

    @Test
    public void testOneSpeechRegion() throws DataProcessingException {
        int sampleRate = 1000;

        input.add(new DataStartSignal(sampleRate));

        input.addAll(createFeatVectors(1, sampleRate, 0, 10, 10)); // create one second of data sampled with 1kHz
        input.add(new SpeechStartSignal(-1));
        input.addAll(createFeatVectors(0.5, sampleRate, 0, 10, 10));
        input.add(new SpeechEndSignal(-1));
View Full Code Here

    @Test
    public void testMultipleSpeechRegionWithoutMerging() throws DataProcessingException {
        int sampleRate = 1000;

        input.add(new DataStartSignal(sampleRate));

        input.addAll(createFeatVectors(0.1, sampleRate, 0, 10, 10)); // create one second of data sampled with 1kHz

        input.add(new SpeechStartSignal(-1));
        input.addAll(createFeatVectors(0.1, sampleRate, 0, 10, 10));
View Full Code Here

    @Test
    public void testMultipleEmptyAndNonemptySegments() throws DataProcessingException {
        int sampleRate = 1000;

        // process an empty segment
        input.add(new DataStartSignal(sampleRate));
        input.add(new DataEndSignal(sampleRate));

        // process a segment which contains a speech segment which is empty
        input.add(new DataStartSignal(sampleRate));
        input.add(new SpeechStartSignal(-1));
        input.add(new SpeechEndSignal(-1));
        input.add(new DataEndSignal(sampleRate));

        // process a segment which contains a speech segment which is empty but has some non-speech data around it
        input.add(new DataStartSignal(sampleRate));
        input.addAll(createFeatVectors(1, sampleRate, 0, 10, 10)); // create one second of data sampled with 1kHz
        input.add(new SpeechStartSignal(-1));
        input.add(new SpeechEndSignal(-1));
        input.addAll(createFeatVectors(1, sampleRate, 0, 10, 10)); // create one second of data sampled with 1kHz
        input.add(new DataEndSignal(sampleRate));

        // and now a some real segments
        input.add(new DataStartSignal(sampleRate));
        input.add(new SpeechStartSignal(-1));
        input.addAll(createFeatVectors(0.1, sampleRate, 0, 10, 10));
        input.add(new SpeechEndSignal(-1));
        input.add(new DataEndSignal(sampleRate));
View Full Code Here

TOP

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

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.