26 #include <flite/flite.h>
50 #define OFFSET(x) offsetof(FliteContext, x)
51 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
69 #define DECLARE_REGISTER_VOICE_FN(name) \
70 cst_voice *register_cmu_us_## name(const char *); \
71 void unregister_cmu_us_## name(cst_voice *);
80 cst_voice * (*register_fn)(
const char *);
86 #define MAKE_VOICE_STRUCTURE(voice_name) { \
87 .name = #voice_name, \
88 .register_fn = register_cmu_us_ ## voice_name, \
89 .unregister_fn = unregister_cmu_us_ ## voice_name, \
102 for (i = 0; i < n; i++)
104 voice_entries[i].
name, i < (n-1) ? sep :
"\n");
113 if (!strcmp(entry->
name, voice_name)) {
118 "Could not register voice '%s'\n", voice_name);
139 flite->
class = &flite_class;
151 if (flite_init() < 0) {
164 "Both text and textfile options set: only one must be specified\n");
174 "The text file '%s' could not be read: %s\n",
181 memcpy(flite->
text, textbuf, textbuf_size);
182 flite->
text[textbuf_size] = 0;
188 "No speech text specified, specify the 'text' or 'textfile' option\n");
209 delete_wave(flite->
wave);
260 nb_samples * flite->
wave->num_channels * 2);
261 samplesref->
pts = flite->
pts;
262 samplesref->
pos = -1;
290 .priv_class = &flite_class,