File: test_init.c

package info (click to toggle)
pocketsphinx 0.8%2B5prealpha%2B1-13
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 44,080 kB
  • sloc: ansic: 22,154; sh: 11,483; python: 657; makefile: 381; perl: 301
file content (28 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <pocketsphinx.h>
#include <stdio.h>
#include <string.h>

#include "test_macros.h"

int
main(int argc, char *argv[])
{
	ps_decoder_t *ps;
	cmd_ln_t *config;

	TEST_ASSERT(config =
		    cmd_ln_init(NULL, ps_args(), TRUE,
				"-hmm", MODELDIR "/en-us/en-us",
				"-lm", MODELDIR "/en-us/en-us.lm.bin",
				"-dict", MODELDIR "/en-us/cmudict-en-us.dict",
				"-fwdtree", "yes",
				"-fwdflat", "yes",
				"-bestpath", "yes",
				"-samprate", "16000", NULL));
	TEST_ASSERT(ps = ps_init(config));

	ps_free(ps);
	cmd_ln_free_r(config);

	return 0;
}