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);
145 if (flite_init() < 0) {
158 "Both text and textfile options set: only one must be specified\n");
168 "The text file '%s' could not be read: %s\n",
175 memcpy(flite->
text, textbuf, textbuf_size);
176 flite->
text[textbuf_size] = 0;
182 "No speech text specified, specify the 'text' or 'textfile' option\n");
201 delete_wave(flite->
wave);
252 nb_samples * flite->
wave->num_channels * 2);
253 samplesref->
pts = flite->
pts;
256 flite->
pts += nb_samples;
282 .priv_class = &flite_class,