diff options
| author | XANTRONIX Development | 2022-02-01 15:39:16 -0500 | 
|---|---|---|
| committer | XANTRONIX Development | 2022-02-01 15:39:16 -0500 | 
| commit | a048f5848e6d57098d4524cb8b97853ef8329854 (patch) | |
| tree | d59a03d2f7d877084009d417c7492f90a4630770 /include | |
| parent | 0cdfdf8c867ac5582968e32a869d1ce3833aabb8 (diff) | |
| download | xas-a048f5848e6d57098d4524cb8b97853ef8329854.tar.gz xas-a048f5848e6d57098d4524cb8b97853ef8329854.tar.bz2 xas-a048f5848e6d57098d4524cb8b97853ef8329854.zip | |
hmm...getting more refined here
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 */ | 
 
    