#ifndef _XAS_VOX_H #define _XAS_VOX_H #include #include #include #include #define XAS_VOX_IDLE 0 #define XAS_VOX_ACTIVE (1 << 0) typedef struct _xas_vox { const char *text2wave_path; size_t sample_size, sample_rate, buffer_size; void *ctx; int flags; int pid, stdin, stdout; FILE *in; } xas_vox; xas_vox *xas_vox_new(const char *text2wave_path, size_t sample_size, size_t sample_rate, size_t buffer_size, void *ctx); 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 */