From 450d30a86d060b51c10df317d9254f8ee5440e3e Mon Sep 17 00:00:00 2001 From: cjus Date: Mon, 18 May 2026 12:08:50 -0600 Subject: [PATCH 01/18] add typed elevenlabs http wrapper --- src/elevenlabs.ts | 175 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 src/elevenlabs.ts diff --git a/src/elevenlabs.ts b/src/elevenlabs.ts new file mode 100644 index 0000000..68143e4 --- /dev/null +++ b/src/elevenlabs.ts @@ -0,0 +1,175 @@ +/** + * @fileoverview Typed `fetch` wrapper for the ElevenLabs HTTP API. + * @purpose Two endpoints, one file. STT (`POST /v1/speech-to-text`, multipart) + * and TTS streaming (`POST /v1/text-to-speech/{voice_id}/stream`, + * JSON in / chunked body out). No SDK — preserves the "marked is the + * only other runtime dep" anti-goal. + * + * Solrac sits behind ElevenLabs at conversational latency. STT is a single + * round-trip with an audio blob; TTS is proxy-streamed from upstream straight + * back to the caller (browser `