From a048f5848e6d57098d4524cb8b97853ef8329854 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Tue, 1 Feb 2022 15:39:16 -0500 Subject: hmm...getting more refined here --- include/xas/vox.h | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'include') 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 #include #include -#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 */ -- cgit v1.2.3