#ifndef _XAS_VOX_H #define _XAS_VOX_H #include #include #include #include #define XAS_VOX_SETTINGS_PATHLEN 64 enum xas_vox_state { XAS_VOX_IDLE, XAS_VOX_ACTIVE }; typedef struct _xas_vox { xas_audio_format format; size_t buffer_size; const char *text2wave_path; int argn; char **args; enum xas_vox_state state; int pid, stdin, stdout; char tmpfile[XAS_VOX_SETTINGS_PATHLEN]; FILE *in; } xas_vox; xas_vox *xas_vox_new(const char *text2wave_path, xas_audio_format format, size_t buffer_size); void xas_vox_destroy(xas_vox *vox); int xas_vox_stop(xas_vox *vox); int xas_vox_active(xas_vox *vox); int xas_vox_generate(xas_vox *vox); int xas_vox_vsayf(xas_vox *vox, const char *message, va_list args); int xas_vox_sayf(xas_vox *vox, const char *message, ...); int xas_vox_say(xas_vox *vox, const char *message); xas_audio_stream *xas_vox_stream_new(xas_vox *vox); #endif /* _XAS_VOX_H */