44#include "EST_Features.h"
45#include "array_smoother.h"
69 n = (int)(op.
F(
"window_length") / fz.
shift());
70 sprintf(nstring,
"%d", n);
71 op.
set(
"point_window_size", nstring);
73 if (!op.
present(
"icda_no_smooth"))
74 smooth_portion(sm_fz, op);
76 if (op.
present(
"icda_no_interp"))
82 int fill = op.
present(
"icda_fi") ? 1 : 0;
83 interp(sm_fz, speech, fill, smi_fz);
85 n = (int)(op.
F(
"second_length") / fz.
shift());
86 sprintf(nstring,
"%d", n);
87 op.
set(
"point_window_size", nstring);
89 if (!op.
present(
"icda_no_smooth"))
90 smooth_portion(smi_fz, op);
101 parse_ms_list(op, ms);
103 if (op.
present(
"point_window_size"))
104 ms->window_length = op.
I(
"point_window_size");
146 interp.resize(speech.
num_frames(), interp.num_channels());
149 for (i = 1; i < interp.num_frames(); ++i)
151 if ((fill == 1) || (speech.
a(i) > 0.5))
153 if (!interp.track_break(i))
157 if ((n = interp.next_non_break(i)) == 0)
158 n = interp.num_frames() - 1;
161 if (n_val <= 0) n_val = p_val;
162 if (p_val <= 0) p_val = n_val;
164 m = (n_val - p_val) / ( interp.t(n) - interp.t(p));
166 interp.a(i) = (m * f) + p_val;
178 if (al.
present(
"smooth_double"))
179 ms->smooth_double = al.
I(
"smooth_double");
181 ms->apply_hanning = al.
I(
"hanning");
183 ms->extrapolate = al.
I(
"extrapolate");
184 if (al.
present(
"first_length"))
185 ms->first_median = al.
I(
"first_length");
186 if (al.
present(
"second_length"))
187 ms->second_median = al.
I(
"second_length");
188 if (al.
present(
"window_length"))
189 ms->window_length = al.
I(
"window_length");
void set(const EST_String &name, int ival)
const float F(const EST_String &path) const
int present(const EST_String &name) const
const int I(const EST_String &path) const
void set_channel_name(const EST_String &name, int channel)
set the name of the channel.
int track_break(int i) const
return true if frame i is a break
float & a(int i, int c=0)
int empty() const
returns true if no values are set in the frame
void set_value(int i)
set frame i to be a value
int num_frames() const
return number of frames in track
void set_break(int i)
set frame i to be a break