plugin/audio_postprocess.c File Reference

A sample audio postprocessing plugin. More...

#include <stdio.h>
#include <string.h>
#include "plugin_defs.h"

Go to the source code of this file.

Defines

#define PLUGIN_TITLE   "audio postprocess plugin for Julius"
 A/D-in postprocessing functions.

Functions

int initialize ()
 Initialization at loading time (optional).
int get_plugin_info (int opcode, char *buf, int buflen)
 Get information of this plugin (required).
void adin_postprocess (SP16 *buf, int len)
 Post-processing function for captured audio.


Detailed Description

A sample audio postprocessing plugin.

Author:
Akinobu Lee
Date:
Sun Aug 10 15:12:50 2008
Revision
1.1

Definition in file audio_postprocess.c.


Define Documentation

#define PLUGIN_TITLE   "audio postprocess plugin for Julius"

A/D-in postprocessing functions.

Required:

Definition at line 41 of file audio_postprocess.c.


Function Documentation

int initialize (  ) 

Initialization at loading time (optional).

If defined, this will be called just before this plugin is loaded to Julius. if this returns -1, the whole functions in this file will not be loaded.

This function is OPTIONAL.

Returns:
0 on success, -1 on failure.

Definition at line 66 of file audio_postprocess.c.

int get_plugin_info ( int  opcode,
char *  buf,
int  buflen 
)

Get information of this plugin (required).

This function should return informations of this plugin file. The required info will be specified by opcode:

This will be called just after Julius find this file and after initialize().

Parameters:
opcode [in] requested operation code
buf [out] buffer to store the return string
buflen [in] maximum length of buf
Returns:
0 on success, -1 on failure. On failure, Julius will ignore this plugin.

Definition at line 108 of file audio_postprocess.c.

void adin_postprocess ( SP16 buf,
int  len 
)

Post-processing function for captured audio.

When defined, this function will be called at every audio input fragments before any feature analysis. buf contains the small fragment of captured audio input at a length of len, and this will be called successively as input goes.

You can monitor the incoming audio stream, and also can modify or overwrite the content of buf to do some audio processing for the incoming data like noise supression etc.

If multiple plugins have this functions, they are all executed in order of loading.

Parameters:
buf [i/o] a fragment of audio inputs
len [in] length of buf (in samples)

Definition at line 163 of file audio_postprocess.c.


Generated on Thu Jul 23 12:14:20 2009 for Julius by  doxygen 1.5.1