46 #define DEFAULT_FRAME_SIZE 0.001 47 #define DEFAULT_FRAME_LENGTH 0.008 48 #define DEFAULT_ORDER 256 49 #define DEFAULT_PREEMPH 0.94 55 int main(
int argc,
char *argv[])
68 "Summary: make spectrogram\n"+
69 "use \"-\" to make input and output files stdin/out\n"+
74 "-shift <float> frame spacing in seconds for fixed frame analysis. This \n" 75 " doesn't have to be the same as the output file spacing - the \n" 76 " S option can be used to resample the track before saving \n" 78 "-length <float> input frame length in milliseconds\n"+
79 "-sr <float> range in which output values should lie\n"+
80 "-slow slow FFT code\n"+
81 "-w <float> white cut off (0.0 to 1.0)\n"+
82 "-b <float> black cut off (0.0 to 1.0)\n"+
83 "-raw Don't perform any scaling\n"+
84 "-order <int> cepstral order\n", files, al);
94 spec.
save(out_file, al.
val(
"-otype", 0));
107 op.
set(
"frame_shift", al.
fval(
"-shift"));
110 op.
set(
"frame_length", al.
fval(
"-length"));
113 op.
set(
"frame_order", al.
fval(
"-order"));
116 op.
set(
"sp_range", al.
fval(
"-sr"));
119 op.
set(
"sp_wcut", al.
fval(
"-w"));
122 op.
set(
"sp_bcut", al.
fval(
"-b"));
125 op.
set(
"preemph", al.
fval(
"-preemph", 1));
A class for storing digital waveforms. The waveform is stored as an array of 16 bit shorts...
float fval(const EST_String &rkey, int m=1) const
void set(const EST_String &name, int ival)
EST_String ftoString(float n, int pres=3, int width=0, int l=0)
Make a EST_String object from an float, with variable precision.
#define DEFAULT_FRAME_SIZE
EST_write_status save(const EST_String name, const EST_String EST_filetype="")
const T & first() const
return const reference to first item in list
EST_String options_wave_input(void)
const V & val(const K &rkey, bool m=0) const
return value according to key (const)
EST_String options_track_output(void)
void make_spectrogram(EST_Wave &sig, EST_Track &sp, EST_Features &op)
EST_read_status read_wave(EST_Wave &sig, const EST_String &in_file, EST_Option &al)
void set_options(EST_Features &op, EST_Option &al)
int present(const K &rkey) const
Returns true if key is present.
int parse_command_line(int argc, char *argv[], const EST_String &usage, EST_StrList &files, EST_Option &al, int make_stdio=1)
int main(int argc, char *argv[])
#define DEFAULT_FRAME_LENGTH