Files
freeswitch-modules/mod_elevenlabs_tts/mod_elevenlabs_tts.h
Hoan Luu Huu 3edb4a47f2 Support elevenlabs TTS streaming api (#7)
* added module for using eleven labs tts

* wip

Signed-off-by: Dave Horton <daveh@beachdognet.com>

* fixes for caching streaming file

* elevenlabs: fix issue that caused issue after mod_reload

* return final response code in playback stopped event

* send error if tts fails

---------

Signed-off-by: Dave Horton <daveh@beachdognet.com>
Co-authored-by: Dave Horton <daveh@beachdognet.com>
2024-01-31 07:35:20 -08:00

45 lines
817 B
C

#ifndef __MOD_ELEVENLABS_TTS_H__
#define __MOD_ELEVENLABS_TTS_H__
#include <switch.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
struct elevenlabs_data {
char *session_id;
char *voice_name;
char* api_key;
char* model_id;
char* similarity_boost;
char* stability;
char* style;
char* use_speaker_boost;
char* optimize_streaming_latency;
/* result data */
long response_code;
char *ct;
char *reported_latency;
char *request_id;
char *history_item_id;
char *name_lookup_time_ms;
char *connect_time_ms;
char *final_response_time_ms;
char *err_msg;
char *cache_filename;
int rate;
void *conn;
FILE *file;
switch_mutex_t *mutex;
void *circularBuffer;
int draining;
int reads;
int cache_audio;
};
typedef struct elevenlabs_data elevenlabs_t;
#endif