Speech-Recognizer-SPX

 view release on metacpan or  search on metacpan

Audio/SPX.xs  view on Meta::CPAN

	OUTPUT:
		RETVAL

void
cont_ad_get_params(cont)
	cont_ad_t *	cont
	PREINIT:
		int32	res, delta_sil, delta_speech, min_noise, max_noise,
			winsize, speech_onset, sil_onset, leader, trailer;
		float32 adapt_rate;
	PPCODE:
#ifdef HAVE_ADAPT_RATE
		res = cont_ad_get_params(cont, &delta_sil, &delta_speech,
					&min_noise, &max_noise, &winsize, &speech_onset,
					&sil_onset, &leader, &trailer, &adapt_rate);
#else
		res = cont_ad_get_params(cont, &delta_sil, &delta_speech,
					&min_noise, &max_noise, &winsize, &speech_onset,
					&sil_onset, &leader, &trailer);
#endif
		if (res == -1)

FE/MFCC.xs  view on Meta::CPAN

	fe_t *		fe

void
fe_process_utt(fe, spch, nsamps)
	fe_t *		fe
	int16 *		spch
	int32		nsamps
	PREINIT:
		float32 **cep;
		int32 i, frame_count, output_frames;
	PPCODE:
		if (fe_process_utt(fe, spch, nsamps, &cep, &output_frames) < 0)
			goto out; /* empty list */
		assert(output_frames <= frame_count);
		if (output_frames <= 0)
			goto out; /* empty list */

		EXTEND(sp, output_frames);
		for (i = 0; i < output_frames; ++i) {
			SV ** svs;
			AV * vec;

SPX.xs  view on Meta::CPAN

	char *		name
	int		arg

void
fbs_init(argv_ref=&PL_sv_undef)
	SV *		argv_ref
	PREINIT:
		int argc;
		char **argv;
		int rv;
	PPCODE:
		if (fbs_init_done)	
			return;

		if (SvOK(argv_ref)) {
			SV * rargv = ST(0); /* Arr, I'm a pirate! */

			if (!(SvROK(rargv)))
				goto bad_arg;
			switch(SvTYPE(SvRV(rargv))) {
			case SVt_PVAV:

SPX.xs  view on Meta::CPAN

SYSRET
uttproc_restart_utt()

void
uttproc_result(block=0)
	int32		block
	PREINIT:
		int32 frm;
		char *hyp = NULL;
		int res;
	PPCODE:
		res = uttproc_result(&frm, &hyp, block);
		if (res < 0)
			return; /* empty list */
		XPUSHs(sv_2mortal(newSViv(frm)));
		if (hyp != NULL) {
			PUSHs(sv_2mortal(newSVpv(hyp, 0)));
		}

void
uttproc_result_seg(block=0)
	int32		block
	PREINIT:
		int32 frm;
		search_hyp_t *hyp;
		int res;
	PPCODE:
		res = uttproc_result_seg(&frm, &hyp, block);
		if (res < 0)
			return; /* empty list */
		XPUSHs(sv_2mortal(newSViv(frm)));
		if (hyp != NULL) {
			PUSHs(sv_2mortal(new_hyp_sv(hyp)));
		}

void
uttproc_partial_result()
	PREINIT:
		int32 frm;
		char *hyp;
		int res;
	PPCODE:
		res = uttproc_partial_result(&frm, &hyp);
		if (res < 0)
			return; /* empty list */
		EXTEND(SP, 2);
		PUSHs(sv_2mortal(newSViv(frm)));
		PUSHs(sv_2mortal(newSVpv(hyp, 0)));

void
uttproc_partial_result_seg()
	PREINIT:
		int32 frm;
		search_hyp_t *hyp;
		int res;
	PPCODE:
		res = uttproc_partial_result_seg(&frm, &hyp);
		if (res < 0)
			return; /* empty list */
		EXTEND(SP, 2);
		PUSHs(sv_2mortal(newSViv(frm)));
		PUSHs(sv_2mortal(new_hyp_sv(hyp)));

char const *
uttproc_get_uttid()

SPX.xs  view on Meta::CPAN

void
search_get_alt(n, sf=0, ef=searchFrame(), w1=NULL, w2="<s>")
	int32	  	n
	int32		sf
	int32		ef
	char *		w1
	char *		w2
	PREINIT:
		int32 w1_wid, w2_wid, i;
		search_hyp_t **alt_out;
	PPCODE:
		/* Convert word strings to word-ids. */
		if (w1 != NULL)
			w1_wid = kb_get_word_id(w1);
		else
			w1_wid = -1;
		if (w2 != NULL)
			w2_wid = kb_get_word_id(w2);
		else
			w2_wid = kb_get_word_id("<s>");



( run in 1.164 second using v1.01-cache-2.11-cpan-5511b514fd6 )