예제 #1
0
/* The entry point of the application. */
static int app_synth_exec(struct ast_channel *chan, ast_app_data data)
{
	ast_format_compat nwriteformat;
	ast_format_clear(&nwriteformat);
	get_synth_format(chan, &nwriteformat);

	int samplerate = 8000;
	/* int framesize = DEFAULT_FRAMESIZE; */
	int framesize = format_to_bytes_per_sample(&nwriteformat) * (DEFAULT_FRAMESIZE / 2);
	struct ast_frame *f;
	struct ast_frame fr;
	struct timeval next;
	int ms;
	apr_size_t len;
	int rres;
	ast_mrcp_profile_t *profile;
	apr_uint32_t speech_channel_number = get_next_speech_channel_number();
	const char *name;
	char buffer[framesize];
	speech_channel_status_t status;
	char *parse;
	int i;
	mrcpsynth_options_t mrcpsynth_options;
	mrcpsynth_session_t mrcpsynth_session;

	AST_DECLARE_APP_ARGS(args,
		AST_APP_ARG(prompt);
		AST_APP_ARG(options);
	);
예제 #2
0
/* The entry point of the application. */
static int app_synth_exec(struct ast_channel *chan, ast_app_data data)
{
	struct ast_frame *f;
	ast_mrcp_profile_t *profile;
	apr_uint32_t speech_channel_number = get_next_speech_channel_number();
	const char *name;
	speech_channel_status_t status;
	char *parse;
	int i;
	mrcpsynth_options_t mrcpsynth_options;
	mrcpsynth_session_t mrcpsynth_session;

	AST_DECLARE_APP_ARGS(args,
		AST_APP_ARG(prompt);
		AST_APP_ARG(options);
	);