mirror of
https://github.com/jambonz/freeswitch-modules.git
synced 2025-12-19 08:57:44 +00:00
* 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>
45 lines
817 B
C
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 |