| title | Real-Time Audio Streaming |
|---|---|
| icon | wave-square |
| description | Stream audio bytes from your Omi device to any backend service in real time. |
Omi streams raw audio bytes from your device to any webhook endpoint you configure. Use this to build custom audio processing, live transcription, or recording workflows.
Stream to your own server, cloud function, or local dev environment Choose how often you receive audio chunks (e.g. every 5, 10, or 30 seconds) Receive raw PCM bytes — add a WAV header to save as audio filesBuild an endpoint that accepts POST requests with raw audio bytes.
Omi sends requests in this format:
```
POST /your-endpoint?sample_rate=16000&uid=user123
Content-Type: application/octet-stream
[raw audio bytes]
```
| Parameter | Description |
|-----------|-------------|
| `sample_rate` | Audio samples per second (see table below) |
| `uid` | The user's unique ID in Omi |
| Body | Raw PCM audio bytes (`application/octet-stream`) |
<Accordion title="Sample Rates by Device" icon="microchip">
| Device | Sample Rate |
|--------|-------------|
| Omi (consumer) | 16,000 Hz |
| DevKit 2 | 16,000 Hz |
| DevKit 1 (v1.0.4+) | 16,000 Hz |
| DevKit 1 (v1.0.2) | 8,000 Hz |
</Accordion>
A complete example that saves audio chunks as WAV files in GCS.
Follow the [Cloud Audio Storage](/doc/developer/savingaudio) guide to create a bucket and get credentials. 1. Fork [github.com/mdmohsin7/omi-audio-streaming](https://github.com/mdmohsin7/omi-audio-streaming) 2. Clone and deploy to any cloud provider (GCP, AWS, DigitalOcean) or run locally with [ngrok](https://ngrok.com/) 3. Set these environment variables:| Variable | Value |
|----------|-------|
| `GOOGLE_APPLICATION_CREDENTIALS_JSON` | Base64-encoded GCP key |
| `GCS_BUCKET_NAME` | Your bucket name |
The repo includes a Dockerfile for easy deployment.
```
https://your-deployment.com/audio
```
Audio files will appear in your GCS bucket at the configured interval.
Set up GCS bucket and credentials Create Omi apps with audio capabilities