File size: 1,134 Bytes
36ebfb6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Gemini Live Audio Frontend (TypeScript)

This React + Vite frontend mirrors the original Streamlit application with a modern interface built in TypeScript.

## Requirements

- Node.js 18 or newer
- Backend running and reachable through WebSocket (`ws://localhost:8000/ws` by default)

## Getting started

```bash
npm install
npm run dev
```

The development server will be available at `http://localhost:5173`.

To produce an optimized build:

```bash
npm run build
```

You can then verify the build locally with:

```bash
npm run preview
```

## Configuration

You can set the WebSocket endpoint via environment variable:

```bash
VITE_WS_URI=ws://your-server:port/ws npm run dev
```

The endpoint can also be adjusted directly from the "WebSocket endpoint" field in the UI.

## Key features

- Captures microphone audio and converts it to 16 kHz PCM.
- Streams audio through WebSocket in 1024-sample packets.
- Plays back the audio returned by the backend in real time.
- Displays the incremental transcript as it arrives.
- Shows live session statistics (duration and packets sent).
- Sleek glassmorphism-inspired interface.