42 #include "sigpr/EST_sigpr_utt.h"
43 #include "EST_cmd_line_options.h"
44 #include "ling_class/EST_relation_aux.h"
45 #include "EST_string_aux.h"
47 #define SIL_NAMES "sil !ENTER !EXIT"
48 #define EVENT_NAMES "a rb arb m mrb"
100 int main(
int argc,
char *argv[])
114 EST_String(
"[input f0 file] -e [input event label file] -o [output file]"
116 "Summary: produce rfc file from events and f0 contour\n"
117 "use \"-\" to make input and output files stdin/out\n"
118 "-h Options help\n\n"+
119 options_track_input()+
"\n"
120 "-event_names <string> List of labels to be classed as events. \n"
121 " Lists are specified as quoted strings with spaces \n"
122 " separating each item, e.g.: \"a b c d\"\n\n"
123 "-sil_names <string> List of labels to be classed as silence \n"
124 " Lists are specified as quoted strings with spaces \n"
125 " separating each item, e.g.: \"pau sil #\"\n\n"
126 "-e <ifile> Input event label file. This file contains \n"
127 " the list of events to be parameterized, each with its approximate \n"
128 " start and stop time marked. This file also contains silencesn \n"
129 " which are used to decide where to insert and stop phrases \n\n"
130 "-o <ofile> Output label file\n\n"
131 "-otype <string> File type of output file \n\n"
132 "-limit <float> start and stop limit in seconds. The rfc \n"
133 " matching algorithm defines a search region within which it tries \n"
134 " all possible rise and fall shapes. This option specifies how much \n"
135 " before the input label start time and how much after the input \n"
136 " label end time the search region should be. Typical value, 0.1 \n\n"
137 "-range <float> Range of RFC search region. In addition to \n"
138 " the limit, the range defines the limits of the rfc matching \n"
139 " search region as a percentage of the overal input label \n"
140 " duration. Typical value, 0.25 (the search region is the first and \n"
141 " last 25% of the label) \n\n"
142 "-smooth Smooth and Interpolate input F0 contour. \n"
143 " rfc matching can only operate on smooth fully interpolated \n"
144 " contours. This option must be used if the contour hasn't already \n"
145 " been smoothed and interpolated\n\n"
146 "-w1 <float> length in seconds of smoothing window prior\n"
147 " to interpolation. Default value 0.05 \n\n"
148 "-w2 <float> length in seconds of smoothing window after\n"
149 " to interpolation. Default value 0.05 \n\n"
150 "-sf0 <ofile> Save f0 contour that results from smoothing \n"
151 "-rfc Save as RFC parameters instead of tilt\n\n",
154 default_rfc_params(rfc_op);
155 override_rfc_params(rfc_op, al);
160 if (read_track(nfz, files.
first(), al) == -1)
165 if (ev.
load(al.
val(
"-e")) != format_ok)
168 pstring = (al.
present(
"-event_names") ? al.
val(
"-event_names"):
170 StringtoStrList(pstring, event_list);
171 convert_to_broad(ev, event_list,
"int_event", 1);
174 pstring = (al.
present(
"-sil_names") ? al.
val(
"-sil_names"):
176 StringtoStrList(pstring, sil_list);
177 change_label(ev, sil_list,
"sil");
182 StringtoStrList(
"sil", sil_list);
183 convert_to_broad(sil_lab, sil_list,
"pos", 0);
184 label_to_track(sil_lab, speech, fz.
shift());
186 smooth_phrase(raw_fz, speech, op, fz);
192 ev.
f.
set(
"name",
"intevents");
193 ev.
f.
set(
"timing_style",
"segment");
198 rfc_analysis(fz, ev, rfc_op);
307 rfc.
set(
"start_limit", al.
fval(
"-limit"));
308 rfc.
set(
"stop_limit", al.
fval(
"-limit", 0));
311 rfc.
set(
"range", al.
fval(
"-range"));
313 rfc.
set(
"min_event_duration", al.
fval(
"-min_dur"));
320 op.
set(
"window_length",0.05);
321 op.
set(
"second_length",0.05);
322 option_override(op, al,
"window_length",
"-w1");
323 option_override(op, al,
"second_length",
"-w2");