diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/xas/vox.h | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/include/xas/vox.h b/include/xas/vox.h index 6b73ae9..179d5d1 100644 --- a/include/xas/vox.h +++ b/include/xas/vox.h @@ -1,18 +1,20 @@ #ifndef _XAS_VOX_H #define _XAS_VOX_H +#include <stdarg.h> #include <sys/types.h> #include <xas/audio.h> -#define XAS_VOX_VOICE_IDLE 0 -#define XAS_VOX_VOICE_ACTIVE (1 << 0) +#define XAS_VOX_IDLE 0 +#define XAS_VOX_ACTIVE (1 << 0) -typedef struct _xas_vox_voice { +typedef struct _xas_vox { const char *text2wave_path; size_t sample_size, - sample_rate; + sample_rate, + buffer_size; void *ctx; @@ -20,12 +22,24 @@ typedef struct _xas_vox_voice { int pid, stdout; -} xas_vox_voice; +} xas_vox; -xas_audio_stream *xas_vox_new(const char *text2wave_path, - size_t sample_size, - size_t sample_rate, - size_t buffer_size, - void *ctx); +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_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 */ |