Files
research_and_development/ai-conversation/utils.h
T
talksik c93267c9ee create full flow with stt, anthropic, tts, and playback
This organizes some components like deepgram into own module, and also
allows gets the full flow to work every time we run the program.
2025-07-27 14:18:12 -07:00

25 lines
581 B
C

#ifndef UTILS_H
#define UTILS_H
#include <stdlib.h>
#include <stdio.h>
struct curl_file_data {
FILE *file;
size_t size;
};
struct curl_response_data {
char *data;
size_t size;
};
// This callback assumes the userdata is `struct file_data`
size_t curl_read_callback_file(void *ptr, size_t size, size_t nmemb, void *userdata);
// This callback assumes that we are aggregating callback data into an allocated response_data struct
size_t curl_write_callback_response(void *contents, size_t size, size_t nmemb,
void *userp);
#endif // UTILS_H