Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/developer/AudioStreaming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ That's it! You should now see audio bytes arriving at your webhook. The audio by
Check out the example below to see how you can save the audio bytes as audio files in Google Cloud Storage using the audio streaming feature.

## Example: Saving Audio Bytes as Audio Files in Google Cloud Storage
1. Create a Google Cloud Storage bucket and set the appropriate permissions. You can follow the steps mentioned [here](https://docs.omi.me/developer/savingaudio) up to step 5.
1. Create a Google Cloud Storage bucket and set the appropriate permissions. You can follow the steps mentioned [here](https://docs.omi.me/docs/developer/savingaudio) up to step 5.
2. Fork the example repository from [github.com/mdmohsin7/omi-audio-streaming](https://github.com/mdmohsin7/omi-audio-streaming).
3. Clone the repository to your local machine.
4. Deploy it to any of your preferred cloud providers like GCP, AWS, DigitalOcean, or run it locally (you can use Ngrok for local testing). The repository includes a Dockerfile for easy deployment.
Expand Down
10 changes: 8 additions & 2 deletions docs/docs/developer/apps/audiostreaming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,20 @@ That's it! You should now see audio bytes arriving at your webhook. The audio by
Check out the example below to see how you can save the audio bytes as audio files in Google Cloud Storage using the audio streaming feature.

## Example: Saving Audio Bytes as Audio Files in Google Cloud Storage
Step 1: Create a Google Cloud Storage bucket and set the appropriate permissions. You can follow the steps mentioned [here](https://docs.omi.me/developer/savingaudio) up to step 5.
Step 1: Create a Google Cloud Storage bucket and set the appropriate permissions. You can follow the steps mentioned [here](https://docs.omi.me/docs/developer/savingaudio) up to step 5.

Step 2: Fork the example repository from [github.com/mdmohsin7/omi-audio-streaming](https://github.com/mdmohsin7/omi-audio-streaming).

Step 3: Clone the repository to your local machine.

Step 4: Deploy it to any of your preferred cloud providers like GCP, AWS, DigitalOcean, or run it locally (you can use Ngrok for local testing). The repository includes a Dockerfile for easy deployment.

Step 5: While deploying, ensure the following environment variables are set:
- `GOOGLE_APPLICATION_CREDENTIALS_JSON`: Your GCP credentials, encoded in base64.
- `GCS_BUCKET_NAME`: The name of your GCP storage bucket.

Step 6: Once the deployment is complete, set the endpoint in the Developer Settings of the Omi App under Realtime audio bytes. The endpoint should be the URL where you deployed the example + `/audio`.

Step 7: You should now see audio files being saved in your GCP bucket every x seconds, where x is the value you set in the `Every x seconds` field.

## Contributing 🤝
Expand All @@ -47,7 +53,7 @@ We welcome contributions from the open source community! Whether it's improving
If you're stuck, have questions, or just want to chat about Omi:

- **GitHub Issues: 🐛** For bug reports and feature requests
- **Community Forum: 💬** Join our [community forum](https://discord.gg/based-hardware-1192313062041067520) for discussions and questions
- **Community Forum: 💬** Join our [community forum](https://discord.gg/omi) for discussions and questions
- **Documentation: 📚** Check out our [full documentation](https://docs.omi.me/) for in-depth guides

Happy coding! 💻 If you have any questions or need further assistance, don't hesitate to reach out to our community.
22 changes: 8 additions & 14 deletions docs/docs/developer/savingaudio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ This guide will walk you through setting up a Google Cloud Storage (GCS) bucket

1. **Head to the GCS Console:**
- Log in to your GCP account and go to the [Google Cloud Storage console](https://console.cloud.google.com/storage/browser).
2. **Click "CREATE BUCKET":**
- Hit that button to get started!
2. **Click "CREATE BUCKET":**
- Hit that button to get started!
3. **Let's Set Up Your Bucket:**
- **Name your bucket:** Pick a unique name that follows the [naming guidelines](https://cloud.google.com/storage/docs/naming-buckets#requirements). Get creative, but keep it relevant! Example: `friend-audio-files`.
- **Where should we store your audio?:** Choose a location that makes sense for you. Think about how quickly you need to access your files and your budget. A **Multi-region** is great for extra reliability across a wider area, while a **Region** gives you faster access in a specific spot.
Expand All @@ -26,16 +26,16 @@ This guide will walk you through setting up a Google Cloud Storage (GCS) bucket
- **Public access prevention:** Keep this **"On"** to make sure your audio stays private. 🤫
- **Access control:** Stick with **"Uniform"** for consistent permissions across all your audio files.
- **Extra protection for your tunes:**
- **Soft delete policy:** This is already on by default – it's like a safety net if you accidentally delete something!
- **Soft delete policy:** This is already on by default – it's like a safety net if you accidentally delete something!
- **Object versioning:** Want to keep track of changes and easily recover older versions? Turn this on!
- **Object retention policy:** If you need to keep audio for a specific amount of time, use this to set rules.
- **Object retention policy:** If you need to keep audio for a specific amount of time, use this to set rules.
- **Encryption type:** Google will keep your audio encrypted by default – you don't need to do anything here unless you have special requirements.
4. **Time to Create:**
- Double-check everything and click **"CREATE"**.
5. **Success!**
- You'll get a message letting you know your bucket is ready to rock. 🤘

## 🔐 Step 2: Create a Service Account 🔐
## 🔐 Step 2: Create a Service Account 🔐

Think of this like a special ID card for your app to access the bucket.

Expand Down Expand Up @@ -82,7 +82,7 @@ This step turns your key file into a special code we can use in the app.
3. **Run This Command:**
- Replace `your-key-file.json` with the actual name of your key file:
```bash
base64 your-key-file.json
base64 -i your-key-file.json
```
4. **Copy the Code:**
- You'll get a long string of text – this is your Base64 encoded key! Copy it.
Expand Down Expand Up @@ -114,15 +114,9 @@ You now have two important pieces:
* **GCP Credentials Base64:** Your special encoded key.
* **GCP Bucket Name:** The name of your audio bucket.

### 📱Last Step📱
1. Open the app
2. Goto Settings
3. Enable Developer Mode
4. Select Developer Mode (scroll down)
5. Enter your GCP Credentails and GCP Bucket Name
6. SAVE 🚀
## Using Your Storage with Audio Streaming

Watch the magic and check out those sweet sounds! 🎶
Now that you have set up your GCP storage, you can use it with Omi's audio streaming feature. For detailed instructions on setting up audio streaming with your newly created storage bucket, please refer to our [Audio Streaming Guide](https://docs.omi.me/docs/developer/apps/audiostreaming).

## Contributing 🤝

Expand Down