41#include "sigpr/EST_sigpr_utt.h"
42#include "EST_cmd_line_options.h"
101 EST_String(
"[input file] -o [output file] [options]\n")+
102 "Summary: pitch track waveform files\n"
103 "use \"-\" to make input and output files stdin/out\n"
104 "-h Options help\n\n"+
105 options_wave_input()+
106 options_pda_general()+
108 options_track_output(),
111 default_pda_options(op);
112 set_parameters(op,
al);
114 if (read_wave(
sig,
files.first(),
al) != format_ok)
121 if (
al.present(
"-pm"))
122 save_pm(out_file,
fz);
124 fz.save(out_file, op.
S(
"f0_file_type",
"0"));
126 if (
al.present(
"-diff"))
128 fz = differentiate(
fz);
129 fz.save(out_file +
".diff", op.
S(
"f0_file_type",
"0"));
137 op.
set(
"srpd_resize", 1);
140 option_override(op,
al,
"pda_frame_shift",
"-shift");
141 option_override(op,
al,
"pda_frame_length",
"-length");
142 option_override(op,
al,
"max_pitch",
"-fmax");
143 option_override(op,
al,
"min_pitch",
"-fmin");
146 option_override(op,
al,
"lpf_cutoff",
"-u");
147 option_override(op,
al,
"lpf_order",
"-forder");
149 option_override(op,
al,
"decimation",
"-d");
150 option_override(op,
al,
"noise_floor",
"-n");
151 option_override(op,
al,
"min_v2uv_coef_thresh",
"-m");
152 option_override(op,
al,
"v2uv_coef_thresh_ratio",
"-R");
153 option_override(op,
al,
"v2uv_coef_thresh",
"-H");
154 option_override(op,
al,
"anti_doubling_thresh",
"-t");
155 option_override(op,
al,
"peak_tracking",
"-P");
157 option_override(op,
al,
"f0_file_type",
"-otype");
158 option_override(op,
al,
"wave_file_type",
"-itype");
160 if (
al.val(
"-L", 0) ==
"true")
161 op.
set(
"do_low_pass",
"true");
162 if (
al.val(
"-R", 0) ==
"true")
163 op.
set(
"do_low_pass",
"false");
225 cerr <<
"save_pm: can't write to file \"" << filename <<
"\"" <<
endl;
230 *
outf <<
"LineType bars \n";
231 *
outf <<
"LineStyle solid \n";
232 *
outf <<
"LineWidth 0 \n";
233 *
outf <<
"Freq 16\n";
234 *
outf <<
"Format Binary \n";
239 for (
int i = 0; i <
fz.num_frames(); ++i)
void set(const EST_String &name, int ival)
const EST_String S(const EST_String &path) const