libsent/include/sent/adin.h

Go to the documentation of this file.
00001 
00023 /*
00024  * Copyright (c) 1991-2006 Kawahara Lab., Kyoto University
00025  * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology
00026  * Copyright (c) 2005-2006 Julius project team, Nagoya Institute of Technology
00027  * All rights reserved
00028  */
00029 
00030 #ifndef __SENT_ADIN__
00031 #define __SENT_ADIN__
00032 
00033 #include <sent/stddefs.h>
00034 #include <sent/speech.h>
00035 
00037 enum {
00038   SP_RAWFILE,                   
00039   SP_MIC,                       
00040   SP_ADINNET,                   
00041   SP_MFCFILE,                   
00042   SP_NETAUDIO,                  
00043   SP_STDIN                      
00044 };
00045 
00047 #define DEFAULT_WSTEP 1000
00048 
00054 #ifdef HAVE_LIBSNDFILE
00055 #define SUPPORTED_WAVEFILE_FORMAT "RAW(BE),WAV,AU,SND,NIST,ADPCM and more"
00056 #else
00057 #define SUPPORTED_WAVEFILE_FORMAT "RAW(BE),WAV"
00058 #endif
00059 
00065 #define ZMEANSAMPLES 48000
00066 
00067 /* adin/adin.c */
00068 boolean adin_select(int source);
00069 boolean adin_standby(int freq, void *arg);
00070 boolean adin_begin();
00071 boolean adin_end();
00072 
00073 /* adin/adin-cut.c */
00074 void
00075 adin_setup_func(int (*cad_read)(SP16 *, int),
00076                 boolean (*cad_pause)(),
00077                 boolean (*cad_resume)(),
00078                 boolean use_cut_def,
00079                 boolean need_thread);
00080 void adin_setup_param(int silence_cut, boolean strip_zero, int cthres, int czc, int margin, int tail_margin, int sample_freq, boolean ignore_speech, boolean need_zeromean);
00081 boolean query_segment_on();
00082 boolean query_thread_on();
00083 void adin_reset_zmean();
00084 int adin_go(int (*ad_process)(SP16 *, int), int (*ad_check)());
00085 
00086 /* adin/adin_mic_*.c */
00087 boolean adin_mic_standby(int freq, void *arg);
00088 boolean adin_mic_start();
00089 boolean adin_mic_stop();
00090 int adin_mic_read(SP16 *buf, int sampnum);
00091 /* adin/adin_netaudio.c  and adin/adin_na.c */
00092 boolean adin_netaudio_standby(int freq, void *arg);
00093 boolean adin_netaudio_start();
00094 boolean adin_netaudio_stop();
00095 int adin_netaudio_read(SP16 *buf, int sampnum);
00096 int NA_standby(int, char *);
00097 void NA_start();
00098 void NA_stop();
00099 int NA_read(SP16 *buf, int sampnum);
00100 
00101 /* adin/adin_file.c */
00102 char *get_line(char *prompt);
00103 boolean adin_file_standby(int freq, void *arg);
00104 boolean adin_file_begin();
00105 int adin_file_read(SP16 *buf, int sampnum);
00106 boolean adin_file_end();
00107 boolean adin_stdin_standby(int freq, void *arg);
00108 boolean adin_stdin_begin();
00109 int adin_stdin_read(SP16 *buf, int sampnum);
00110 
00111 /* adin/adin_sndfile.c */
00112 #ifdef HAVE_LIBSNDFILE
00113 boolean adin_sndfile_standby(int freq, void *arg);
00114 boolean adin_sndfile_begin();
00115 int adin_sndfile_read(SP16 *buf, int sampnum);
00116 boolean adin_sndfile_end();
00117 #endif
00118 
00119 /* adin/adin_tcpip.c */
00120 boolean adin_tcpip_standby(int freq, void *arg);
00121 boolean adin_tcpip_begin();
00122 boolean adin_tcpip_end();
00123 int adin_tcpip_read(SP16 *buf, int sampnum);
00124 boolean adin_tcpip_send_pause();
00125 boolean adin_tcpip_send_terminate();
00126 boolean adin_tcpip_send_resume();
00127 
00128 /* adin/zc-e.c */
00129 void init_count_zc_e(int c_trigger, int c_length, int c_offset);
00130 void end_count_zc_e();
00131 int count_zc_e(SP16 *buf,int step);
00132 int count_zc_e_level(SP16 *buf,int step,int *levelp);
00133 void zc_copy_buffer(SP16 *newbuf, int *len);
00134 
00135 /* adin/zmean.c */
00136 void zmean_reset();
00137 void sub_zmean(SP16 *speech, int samplenum);
00138 
00139 
00140 #endif /* __SENT_ADIN__ */

Generated on Tue Dec 26 12:53:22 2006 for Julian by  doxygen 1.5.0