mirror of
https://github.com/cmusphinx/pocketsphinx.git
synced 2026-06-16 12:24:32 +00:00
Fixes testsuite
git-svn-id: svn+ssh://svn.code.sf.net/p/cmusphinx/code/trunk/pocketsphinx@12148 94700074-3cef-4d97-a70e-9c8c206c02f5
This commit is contained in:
@@ -11,8 +11,8 @@ pocketsphinx_mdef_convert_LDADD = \
|
||||
pocketsphinx_batch_SOURCES = batch.c
|
||||
pocketsphinx_batch_LDADD = \
|
||||
$(top_builddir)/src/libpocketsphinx/libpocketsphinx.la
|
||||
|
||||
pocketsphinx_kws_SOURCES = pocketsphinx_kws.c
|
||||
|
||||
pocketsphinx_kws_SOURCES = kws.c
|
||||
pocketsphinx_kws_LDADD = \
|
||||
$(top_builddir)/src/libpocketsphinx/libpocketsphinx.la
|
||||
|
||||
@@ -20,11 +20,6 @@ pocketsphinx_continuous_SOURCES = continuous.c
|
||||
pocketsphinx_continuous_LDADD = \
|
||||
$(top_builddir)/src/libpocketsphinx/libpocketsphinx.la -lsphinxad
|
||||
|
||||
pocketsphinx_kws_SOURCES = kws.c
|
||||
pocketsphinx_kws_LDADD = \
|
||||
$(top_builddir)/src/libpocketsphinx/libpocketsphinx.la -lsphinxad
|
||||
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/src/libpocketsphinx \
|
||||
-I$(top_builddir)/include
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
at n. e. c. is the need for international managers will keep rising (n800_440c0201 -52810)
|
||||
the company has five hundred japanese managers have received most of them in key positions in expects the number to rise sixty %percent of the next five years (n800_440c0202 -97294)
|
||||
about half of these managers are in the u. s. (n800_440c0203 -36755)
|
||||
r. l. i. corporation a jury illinois based insurance holding company will begin trading friday on the big board under the symbol r. l. i. (n800_440c0204 -106143)
|
||||
the company previously traded over the counter (n800_440c0205 -40976)
|
||||
two other issues began trading recently on the big board (n800_440c0206 -46332)
|
||||
the agency is unlikely to take any action until the union's rank and file puts on the contract in two to three weeks (n800_440c0207 -73803)
|
||||
at n. e. c. is needed for international managers will keep rising (n800_440c0201 -49565)
|
||||
the company has five hundred japanese managers in overseas most of them in key positions in expects the number to rise sixteen %percent to the next five years (n800_440c0202 -91117)
|
||||
about half of these managers are in the u. s. (n800_440c0203 -33870)
|
||||
r. l. i. corporation a jury illinois based insurance holding company will begin trading friday on the big board under the symbol r. l. i. (n800_440c0204 -97451)
|
||||
the company previously traded over the counter (n800_440c0205 -37088)
|
||||
two other issues began trading recently on the big board (n800_440c0206 -42394)
|
||||
the agency is unlikely that take any action until the union's rank and file for a summit contract in two to three weeks (n800_440c0207 -69401)
|
||||
|
||||
+12
-12
@@ -7,19 +7,19 @@
|
||||
#include "test_macros.h"
|
||||
|
||||
static const mfcc_t prior[13] = {
|
||||
FLOAT2MFCC(31.61),
|
||||
FLOAT2MFCC(-1.42),
|
||||
FLOAT2MFCC(0.82),
|
||||
FLOAT2MFCC(0.48),
|
||||
FLOAT2MFCC(-0.72),
|
||||
FLOAT2MFCC(0.19),
|
||||
FLOAT2MFCC(-0.06),
|
||||
FLOAT2MFCC(0.31),
|
||||
FLOAT2MFCC(0.42),
|
||||
FLOAT2MFCC(0.58),
|
||||
FLOAT2MFCC(33.89),
|
||||
FLOAT2MFCC(-1.13),
|
||||
FLOAT2MFCC(0.83),
|
||||
FLOAT2MFCC(0.49),
|
||||
FLOAT2MFCC(-0.65),
|
||||
FLOAT2MFCC(0.12),
|
||||
FLOAT2MFCC(-0.03),
|
||||
FLOAT2MFCC(0.28),
|
||||
FLOAT2MFCC(0.41),
|
||||
FLOAT2MFCC(0.59),
|
||||
FLOAT2MFCC(0.11),
|
||||
FLOAT2MFCC(-0.24),
|
||||
FLOAT2MFCC(0.18)
|
||||
FLOAT2MFCC(-0.20),
|
||||
FLOAT2MFCC(0.17)
|
||||
};
|
||||
|
||||
int
|
||||
|
||||
@@ -60,7 +60,7 @@ main(int argc, char *argv[])
|
||||
TEST_ASSERT(acmod_end_utt(acmod) >= 0);
|
||||
fclose(rawfh);
|
||||
}
|
||||
TEST_EQUAL(0, strcmp("go forward in the shares",
|
||||
TEST_EQUAL(0, strcmp("go forward and readers",
|
||||
ngram_search_bp_hyp(ngs, ngram_search_find_exit(ngs, -1, NULL, NULL))));
|
||||
c = clock() - c;
|
||||
printf("2 * fwdflat search in %.2f sec\n",
|
||||
|
||||
@@ -61,7 +61,7 @@ main(int argc, char *argv[])
|
||||
TEST_ASSERT(acmod_end_utt(acmod) >= 0);
|
||||
fclose(rawfh);
|
||||
}
|
||||
TEST_EQUAL(0, strcmp("go forward to any leaders",
|
||||
TEST_EQUAL(0, strcmp("go forward to any shares",
|
||||
ngram_search_bp_hyp(ngs, ngram_search_find_exit(ngs, -1, NULL, NULL))));
|
||||
c = clock() - c;
|
||||
printf("5 * fwdtree search in %.2f sec\n",
|
||||
|
||||
@@ -78,11 +78,11 @@ main(int argc, char *argv[])
|
||||
ps_lattice_hyp(dag, ps_lattice_bestpath(dag, ngs->lmset, 1.461538, 15.0)));
|
||||
}
|
||||
printf("%s\n", ngram_search_bp_hyp(ngs, ngram_search_find_exit(ngs, -1, NULL, NULL)));
|
||||
TEST_EQUAL(0, strcmp("go forward to any leaders",
|
||||
TEST_EQUAL(0, strcmp("go forward to any shares",
|
||||
ngram_search_bp_hyp(ngs, ngram_search_find_exit(ngs, -1, NULL, NULL))));
|
||||
printf("%s\n", ps_lattice_hyp(dag, ps_lattice_bestpath(dag, ngs->lmset,
|
||||
1.461538, 15.0)));
|
||||
TEST_EQUAL(0, strcmp("go forward ten readers",
|
||||
TEST_EQUAL(0, strcmp("go forward to any shares",
|
||||
ps_lattice_hyp(dag, ps_lattice_bestpath(dag, ngs->lmset,
|
||||
1.461538, 15.0))));
|
||||
c = clock() - c;
|
||||
|
||||
@@ -83,7 +83,7 @@ main(int argc, char *argv[])
|
||||
printf("FWDFLAT: %s\n",
|
||||
ngram_search_bp_hyp(ngs, ngram_search_find_exit(ngs, -1, NULL, NULL)));
|
||||
}
|
||||
TEST_EQUAL(0, strcmp("go forward to ten readers",
|
||||
TEST_EQUAL(0, strcmp("go forward and readers",
|
||||
ngram_search_bp_hyp(ngs, ngram_search_find_exit(ngs, -1, NULL, NULL))));
|
||||
c = clock() - c;
|
||||
printf("5 * fwdtree + fwdflat search in %.2f sec\n",
|
||||
|
||||
@@ -79,23 +79,25 @@ main(int argc, char *argv[])
|
||||
}
|
||||
besthyp = ckd_salloc
|
||||
(ps_lattice_hyp(dag, ps_lattice_bestpath
|
||||
(dag, ngs->lmset, 1.461538, 15.0)));
|
||||
(dag, ngs->lmset, 6.5, 1.0)));
|
||||
printf("BESTPATH: %s\n", besthyp);
|
||||
|
||||
TEST_ASSERT(nbest = ps_astar_start(dag, ngs->lmset, 1.461538, 0, -1, -1, -1));
|
||||
TEST_ASSERT(nbest = ps_astar_start(dag, ngs->lmset, 6.5, 0, -1, -1, -1));
|
||||
i = 0;
|
||||
while ((path = ps_astar_next(nbest))) {
|
||||
if (i == 0)
|
||||
TEST_EQUAL(0,
|
||||
strcmp(besthyp, ps_astar_hyp(nbest, path)));
|
||||
if (i++ < 10)
|
||||
if (i < 10)
|
||||
printf("NBEST %d: %s\n", i,
|
||||
ps_astar_hyp(nbest, path));
|
||||
if (i == 0) {
|
||||
TEST_EQUAL(0,
|
||||
strcmp(besthyp, ps_astar_hyp(nbest, path)));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
ps_astar_finish(nbest);
|
||||
ckd_free(besthyp);
|
||||
}
|
||||
TEST_EQUAL(0, strcmp("go forward to any leaders",
|
||||
TEST_EQUAL(0, strcmp("go forward to any shares",
|
||||
ngram_search_bp_hyp(ngs, ngram_search_find_exit(ngs, -1, NULL, NULL))));
|
||||
c = clock() - c;
|
||||
printf("5 * fwdtree + bestpath + N-best search in %.2f sec\n",
|
||||
|
||||
@@ -16,10 +16,11 @@ main(int argc, char *argv[])
|
||||
"-hmm", MODELDIR "/hmm/en_US/hub4wsj_sc_8k",
|
||||
"-lm", MODELDIR "/lm/en_US/wsj0vp.5000.DMP",
|
||||
"-dict", MODELDIR "/lm/en_US/cmu07a.dic",
|
||||
"-fwdflatlw", "6.5",
|
||||
"-fwdtree", "no",
|
||||
"-fwdflat", "yes",
|
||||
"-bestpath", "no",
|
||||
"-input_endian", "little",
|
||||
"-samprate", "16000", NULL));
|
||||
return ps_decoder_test(config, "FWDFLAT", "go forward to ten readers");
|
||||
return ps_decoder_test(config, "FWDFLAT", "go forward ten readers");
|
||||
}
|
||||
|
||||
@@ -21,5 +21,5 @@ main(int argc, char *argv[])
|
||||
"-bestpath", "no",
|
||||
"-input_endian", "little",
|
||||
"-samprate", "16000", NULL));
|
||||
return ps_decoder_test(config, "FWDTREE", "go forward ten readers");
|
||||
return ps_decoder_test(config, "FWDTREE", "go forward to any shares");
|
||||
}
|
||||
|
||||
@@ -21,5 +21,5 @@ main(int argc, char *argv[])
|
||||
"-bestpath", "yes",
|
||||
"-input_endian", "little",
|
||||
"-samprate", "16000", NULL));
|
||||
return ps_decoder_test(config, "BESTPATH", "go forward ten readers");
|
||||
return ps_decoder_test(config, "BESTPATH", "go forward to any shares");
|
||||
}
|
||||
|
||||
@@ -16,10 +16,12 @@ main(int argc, char *argv[])
|
||||
"-hmm", MODELDIR "/hmm/en_US/hub4wsj_sc_8k",
|
||||
"-lm", MODELDIR "/lm/en_US/wsj0vp.5000.DMP",
|
||||
"-dict", MODELDIR "/lm/en_US/cmu07a.dic",
|
||||
"-lw", "6.5",
|
||||
"-fwdflatlw", "6.5",
|
||||
"-fwdtree", "yes",
|
||||
"-fwdflat", "yes",
|
||||
"-bestpath", "no",
|
||||
"-input_endian", "little",
|
||||
"-samprate", "16000", NULL));
|
||||
return ps_decoder_test(config, "FWDFLAT", "go forward to ten readers");
|
||||
return ps_decoder_test(config, "FWDFLAT", "go forward ten readers");
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ main(int argc, char *argv[])
|
||||
|
||||
TEST_ASSERT(acmod_end_utt(acmod) >= 0);
|
||||
fclose(rawfh);
|
||||
TEST_EQUAL(0, strcmp("go forward in the shares",
|
||||
TEST_EQUAL(0, strcmp("go forward and readers",
|
||||
ngram_search_bp_hyp(ngs,
|
||||
ngram_search_find_exit(ngs, -1, NULL, NULL))));
|
||||
|
||||
@@ -79,7 +79,7 @@ main(int argc, char *argv[])
|
||||
ngram_search_bp_hyp(ngs, ngram_search_find_exit(ngs, -1, NULL, NULL)));
|
||||
|
||||
TEST_ASSERT(acmod_end_utt(acmod) >= 0);
|
||||
TEST_EQUAL(0, strcmp("go forward in the shares",
|
||||
TEST_EQUAL(0, strcmp("go forward and readers",
|
||||
ngram_search_bp_hyp(ngs,
|
||||
ngram_search_find_exit(ngs, -1, NULL, NULL))));
|
||||
fclose(senfh);
|
||||
|
||||
Reference in New Issue
Block a user