50 #define SIL_NAMES "sil !ENTER !EXIT" 51 #define EVENT_NAMES "a rb arb m mrb" 74 int main(
int argc,
char *argv[])
88 EST_String(
"[input f0 file] -e [input event label file] -o [output file]" 90 "Summary: produce rfc file from events and f0 contour\n" 91 "use \"-\" to make input and output files stdin/out\n" 92 "-h Options help\n\n"+
94 "-event_names <string> List of labels to be classed as events. \n" 95 " Lists are specified as quoted strings with spaces \n" 96 " separating each item, e.g.: \"a b c d\"\n\n" 97 "-sil_names <string> List of labels to be classed as silence \n" 98 " Lists are specified as quoted strings with spaces \n" 99 " separating each item, e.g.: \"pau sil #\"\n\n" 100 "-e <ifile> Input event label file. This file contains \n" 101 " the list of events to be parameterized, each with its approximate \n" 102 " start and stop time marked. This file also contains silencesn \n" 103 " which are used to decide where to insert and stop phrases \n\n" 104 "-o <ofile> Output label file\n\n" 105 "-otype <string> File type of output file \n\n" 106 "-limit <float> start and stop limit in seconds. The rfc \n" 107 " matching algorithm defines a search region within which it tries \n" 108 " all possible rise and fall shapes. This option specifies how much \n" 109 " before the input label start time and how much after the input \n" 110 " label end time the search region should be. Typical value, 0.1 \n\n" 111 "-range <float> Range of RFC search region. In addition to \n" 112 " the limit, the range defines the limits of the rfc matching \n" 113 " search region as a percentage of the overal input label \n" 114 " duration. Typical value, 0.25 (the search region is the first and \n" 115 " last 25% of the label) \n\n" 116 "-smooth Smooth and Interpolate input F0 contour. \n" 117 " rfc matching can only operate on smooth fully interpolated \n" 118 " contours. This option must be used if the contour hasn't already \n" 119 " been smoothed and interpolated\n\n" 120 "-w1 <float> length in seconds of smoothing window prior\n" 121 " to interpolation. Default value 0.05 \n\n" 122 "-w2 <float> length in seconds of smoothing window after\n" 123 " to interpolation. Default value 0.05 \n\n" 124 "-sf0 <ofile> Save f0 contour that results from smoothing \n" 125 "-rfc Save as RFC parameters instead of tilt\n\n",
142 pstring = (al.
present(
"-event_names") ? al.
val(
"-event_names"):
148 pstring = (al.
present(
"-sil_names") ? al.
val(
"-sil_names"):
166 ev.
f.
set(
"name",
"intevents");
167 ev.
f.
set(
"timing_style",
"segment");
190 rfc.
set(
"start_limit", al.
fval(
"-limit"));
191 rfc.
set(
"stop_limit", al.
fval(
"-limit", 0));
194 rfc.
set(
"range", al.
fval(
"-range"));
196 rfc.
set(
"min_event_duration", al.
fval(
"-min_dur"));
203 op.
set(
"window_length",0.05);
204 op.
set(
"second_length",0.05);
A class for storing digital waveforms. The waveform is stored as an array of 16 bit shorts...
void set_fn_start(EST_Relation &ev)
void option_override(EST_Features &op, EST_Option al, const EST_String &option, const EST_String &arg)
float fval(const EST_String &rkey, int m=1) const
void set(const EST_String &name, int ival)
void set_options(EST_Option &al, EST_Features &op)
void rfc_analysis(EST_Track &fz, EST_Relation &ev, EST_Features &op)
void label_to_track(const EST_Relation &lab, const EST_Option &al, const EST_Option &op, EST_Track &tr)
void convert_to_broad(EST_Relation &seg, EST_StrList &pos_list, EST_String broad_name="", int polarity=1)
int main(int argc, char *argv[])
void smooth_phrase(EST_Track &c, EST_Track &speech, EST_Features &options, EST_Track &sm)
void StringtoStrList(EST_String s, EST_StrList &l, EST_String sep)
Convert a EST_String to a EST_StrList by separating tokens in s delimited by the separator sep...
EST_write_status save(const EST_String name, const EST_String EST_filetype="")
void override_rfc_params(EST_Features &rfc, EST_Option &al)
EST_String options_track_input(void)
void extract_channels(EST_Wave &single, const EST_Wave &multi, EST_IList &ch_list)
const T & first() const
return const reference to first item in list
const V & val(const K &rkey, bool m=0) const
return value according to key (const)
void rfc_to_tilt(EST_Features &rfc, EST_Features &tilt)
Convert a single set of local RFC parameters to local tilt parameters. See RFC to F0 Synthesis for a ...
int read_track(EST_Track &tr, const EST_String &in_file, EST_Option &al)
int present(const K &rkey) const
Returns true if key is present.
EST_write_status save(const EST_String &filename, bool evaluate_ff=false) const
void remove_item_feature(const EST_String &name)
EST_read_status load(const EST_String &filename, const EST_String &type="esps")
int parse_command_line(int argc, char *argv[], const EST_String &usage, EST_StrList &files, EST_Option &al, int make_stdio=1)
void change_label(EST_Relation &seg, const EST_StrList &oname, const EST_String &nname)
void copy_sub_track(EST_Track &st, int start_frame=0, int nframes=EST_ALL, int start_chan=0, int nchans=EST_ALL) const
void default_rfc_params(EST_Features &op)
Utility EST_String Functions header file.