00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #ifndef CMD_LN_DEFN_H
00048 #define CMD_LN_DEFN_H
00049
00050 #include "cmd_ln.h"
00051 #include "fe.h"
00052
00053 const char helpstr[] =
00054 "Description: \n\
00055 Extract acoustic features form from audio file.\n\
00056 \n\
00057 The main parameters that affect the final output, with typical values, are:\n\
00058 \n\
00059 samprate, typically 8000, 11025, or 16000\n\
00060 lowerf, 130, 200, 130, for the respective sampling rates above\n\
00061 upperf, 3700, 5200, 6800, for the respective sampling rates above\n\
00062 nfilt, 31, 37, 40, for the respective sampling rates above\n\
00063 nfft, 256 or 512\n\
00064 format, raw or nist or mswav\n\
00065 \"";
00066
00067 const char examplestr[] =
00068 "Example: \n\
00069 This example creates a cepstral file named \"output.mfc\" from an input audio file named \"input.raw\", which is a raw audio file (no header information), which was originally sampled at 16kHz. \n\
00070 \n\
00071 sphinx_fe -i input.raw \n\
00072 -o output.mfc \n\
00073 -input_endian little \n\
00074 -samprate 16000 \n\
00075 -lowerf 130 \n\
00076 -upperf 6800 \n\
00077 -nfilt 40 \n\
00078 -nfft 512";
00079
00080 static arg_t defn[] = {
00081 { "-help",
00082 ARG_BOOLEAN,
00083 "no",
00084 "Shows the usage of the tool"},
00085
00086 { "-example",
00087 ARG_BOOLEAN,
00088 "no",
00089 "Shows example of how to use the tool"},
00090
00091 waveform_to_cepstral_command_line_macro(),
00092
00093 { "-argfile",
00094 ARG_STRING,
00095 NULL,
00096 "Argument file (e.g. feat.params from an acoustic model) to read parameters from. This will override anything set in other command line arguments." },
00097
00098 { "-i",
00099 ARG_STRING,
00100 NULL,
00101 "Single audio input file" },
00102
00103 { "-o",
00104 ARG_STRING,
00105 NULL,
00106 "Single cepstral output file" },
00107
00108 { "-c",
00109 ARG_STRING,
00110 NULL,
00111 "Control file for batch processing" },
00112
00113 { "-nskip",
00114 ARG_INT32,
00115 "0",
00116 "If a control file was specified, the number of utterances to skip at the head of the file" },
00117
00118 { "-runlen",
00119 ARG_INT32,
00120 "-1",
00121 "If a control file was specified, the number of utterances to process, or -1 for all" },
00122
00123 { "-part",
00124 ARG_INT32,
00125 "0",
00126 "Index of the part to run (supersedes -nskip and -runlen if non-zero)" },
00127
00128 { "-npart",
00129 ARG_INT32,
00130 "0",
00131 "Number of parts to run in (supersedes -nskip and -runlen if non-zero)" },
00132
00133 { "-di",
00134 ARG_STRING,
00135 NULL,
00136 "Input directory, input file names are relative to this, if defined" },
00137
00138 { "-ei",
00139 ARG_STRING,
00140 NULL,
00141 "Input extension to be applied to all input files" },
00142
00143 { "-do",
00144 ARG_STRING,
00145 NULL,
00146 "Output directory, output files are relative to this" },
00147
00148 { "-eo",
00149 ARG_STRING,
00150 NULL,
00151 "Output extension to be applied to all output files" },
00152
00153 { "-build_outdirs",
00154 ARG_BOOLEAN,
00155 "yes",
00156 "Create missing subdirectories in output directory" },
00157
00158 { "-nist",
00159 ARG_BOOLEAN,
00160 "no",
00161 "Defines input format as NIST sphere" },
00162
00163 { "-raw",
00164 ARG_BOOLEAN,
00165 "no",
00166 "Defines input format as raw binary data" },
00167
00168 { "-mswav",
00169 ARG_BOOLEAN,
00170 "no",
00171 "Defines input format as Microsoft Wav (RIFF)" },
00172
00173 { "-nchans",
00174 ARG_INT32,
00175 "1",
00176 "Number of channels of data (interlaced samples assumed)" },
00177
00178 { "-whichchan",
00179 ARG_INT32,
00180 "1",
00181 "Channel to process" },
00182
00183 { "-ofmt",
00184 ARG_STRING,
00185 "sphinx",
00186 "Format of output files - one of sphinx, htk, text." },
00187
00188 { "-mach_endian",
00189 ARG_STRING,
00190 #ifdef WORDS_BIGENDIAN
00191 "big",
00192 #else
00193 "little",
00194 #endif
00195 "Endianness of machine, big or little" },
00196
00197 { "-blocksize",
00198 ARG_INT32,
00199 "2048",
00200 "Number of samples to read at a time." },
00201
00202 { "-spec2cep",
00203 ARG_BOOLEAN,
00204 "no",
00205 "Input is log spectral files, output is cepstral files" },
00206
00207 { "-cep2spec",
00208 ARG_BOOLEAN,
00209 "no",
00210 "Input is cepstral files, output is log spectral files" },
00211
00212 { NULL, 0, NULL, NULL }
00213 };
00214
00215
00216 #define CMD_LN_DEFN_H
00217
00218 #endif
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291