Utility components and functions for dealing with the Gemini Live API in Svelte
Utility components and functions for dealing with the Gemini Live API in Svelte

Currently, I’m putting everything into a Svelte component called GeminiLive.
It’s currently capable of:
Wow, that’s not much!
Behind the scenes, though, a lot is happening:
AudioWorkletProcessor to capture audio data without blocking the main threadAnd while you can’t hear Gemini’s response yet, when I speak into the microphone, I see beautiful base64 data coming back from the API, which I can only hope is a wonderful “hello” back from Gemini.
The hardest part of this project seems to be designing the library itself. I’ve never really made a reusable component or library before.
.svelte.ts file and export that?The component itself has no UI yet, but I’ve added some basic checkboxes to the demo page. It’s real ugly though:

Honestly, I had a lot of fun making the logo. I used Lunacy.
It was originally going to be a horizontally centered audio wave. But as I copied the rounded rectangles and made them each a different size, I liked the top-aligned look.
So, I went with it.
Log in to leave a comment