> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omi.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloud Audio Storage

> Set up Google Cloud Storage for saving audio files from your Omi device.

## Overview

Store audio files from your Omi device in Google Cloud Storage (GCS). This guide walks you through creating a bucket, setting up credentials, and connecting it to the [Audio Streaming](/doc/developer/AudioStreaming) feature.

<Info>
  You'll need an active Google Cloud Platform account. If you don't have one, [create one here](https://console.cloud.google.com/).
</Info>

***

## Setup

<Steps>
  <Step title="Create a Storage Bucket" icon="bucket">
    1. Go to the [GCS console](https://console.cloud.google.com/storage/browser)
    2. Click **Create Bucket**
    3. Configure the bucket:

    | Setting        | Recommended Value                                             |
    | -------------- | ------------------------------------------------------------- |
    | Name           | Something unique, e.g. `omi-audio-files`                      |
    | Location       | Multi-region for reliability, or single region for lower cost |
    | Storage class  | **Standard** (for frequently accessed files)                  |
    | Public access  | **Off** (keep audio private)                                  |
    | Access control | **Uniform**                                                   |

    4. Click **Create**
  </Step>

  <Step title="Create a Service Account" icon="user-gear">
    1. Go to **IAM & Admin → Service Accounts** in the GCP console
    2. Click **Create Service Account**
    3. Set the name (e.g. `omi-audio-uploader`)
    4. Grant the **Storage Object User** role
    5. Click **Done**
  </Step>

  <Step title="Generate a JSON Key" icon="key">
    1. Click on the service account you just created
    2. Go to the **Keys** tab
    3. Click **Add Key → Create new key → JSON**
    4. The key file downloads automatically

    <Warning>
      Keep this key file secure. It grants access to your storage bucket.
    </Warning>
  </Step>

  <Step title="Base64 Encode the Key" icon="lock">
    Convert the key to Base64 for use as an environment variable:

    <Tabs>
      <Tab title="macOS / Linux" icon="terminal">
        ```bash theme={null}
        base64 -i your-key-file.json
        ```
      </Tab>

      <Tab title="Windows" icon="windows">
        ```powershell theme={null}
        [Convert]::ToBase64String([IO.File]::ReadAllBytes("your-key-file.json"))
        ```
      </Tab>
    </Tabs>

    Copy the output — this is your `GOOGLE_APPLICATION_CREDENTIALS_JSON` value.
  </Step>

  <Step title="Note Your Bucket Name" icon="clipboard">
    Go back to the [GCS console](https://console.cloud.google.com/storage/browser) and copy your bucket name from the list. This is your `GCS_BUCKET_NAME` value.
  </Step>
</Steps>

***

## Environment Variables

You'll need these two values when deploying the audio streaming service:

| Variable                              | Description                        |
| ------------------------------------- | ---------------------------------- |
| `GOOGLE_APPLICATION_CREDENTIALS_JSON` | Base64-encoded service account key |
| `GCS_BUCKET_NAME`                     | Your storage bucket name           |

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Audio Streaming" icon="wave-square" href="/doc/developer/AudioStreaming">
    Stream real-time audio from your device to cloud storage
  </Card>

  <Card title="Build Apps" icon="puzzle-piece" href="/doc/developer/apps/Introduction">
    Create apps that use audio data
  </Card>
</CardGroup>
