From 32a5c95408d811492ca5534f7a9bde836d3b400d Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Fri, 14 Mar 2025 21:10:35 +0100 Subject: [PATCH] - Corrected the link to the saving audio guide in AudioStreaming.mdx. details is here https://discord.com/channels/1192313062041067520/1350189103961870367 --- docs/docs/developer/AudioStreaming.mdx | 2 +- docs/docs/developer/apps/audiostreaming.mdx | 10 ++++++++-- docs/docs/developer/savingaudio.mdx | 22 ++++++++------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/docs/developer/AudioStreaming.mdx b/docs/docs/developer/AudioStreaming.mdx index b159d16d52b..588067c31f6 100644 --- a/docs/docs/developer/AudioStreaming.mdx +++ b/docs/docs/developer/AudioStreaming.mdx @@ -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. diff --git a/docs/docs/developer/apps/audiostreaming.mdx b/docs/docs/developer/apps/audiostreaming.mdx index d24884c2e69..885dee2d1cc 100644 --- a/docs/docs/developer/apps/audiostreaming.mdx +++ b/docs/docs/developer/apps/audiostreaming.mdx @@ -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 🀝 @@ -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. diff --git a/docs/docs/developer/savingaudio.mdx b/docs/docs/developer/savingaudio.mdx index 9e39eda641e..8a2b0cb9af1 100644 --- a/docs/docs/developer/savingaudio.mdx +++ b/docs/docs/developer/savingaudio.mdx @@ -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. @@ -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. @@ -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. @@ -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 🀝