Files
Arjun Patel 8870741c3e ai conversation (#49)
* capture audio with alsa

* add brainstorm thoughts

* use basecamp project for managing this project

* add libcurl basic example

* write pcm data to file

* transcribe audio file with deepgram

* transcribe raw audio

* hit anthropic API for ai question

* 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.

* organize audio and intelligence modules

* organize header files into include directory

* docs: add readme

* docs: explain future work

* docs: add disclaimer about hardcoded audio params
2025-07-27 15:07:30 -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