From fd94bece2adea8fd0464481d2282ba69247de3e3 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Mon, 10 Mar 2025 20:46:57 +0530 Subject: [PATCH 1/3] Update README.md - add link to the doc --- backend/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/README.md b/backend/README.md index 823a8e00eb..d0d72d6e83 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,7 +1,7 @@ # Setup 1. Install the google-cloud-sdk `brew install google-cloud-sdk` or if you use nix envdir, it should be installed for you -2. You will need to have your own Google Cloud Project (please refer to the App Docs on how to setup Firebase). If you did setup Firebase for the App, then you'll already have a Project in Google Cloud. +2. You will need to have your own Google Cloud Project (please refer to the [App Docs]([url](https://docs.omi.me/docs/developer/AppSetup#7-setup-firebase)) on how to setup Firebase). If you did setup Firebase for the App, then you'll already have a Project in Google Cloud. Make sure you have the `Cloud Resource Manager` and `Firebase Management API` permissions at the minimum in the [Google Cloud API Console](https://console.cloud.google.com/apis/dashboard) 3. Run the following commands one by one ``` From 352af9533a48981236d97c3613329dc779c7b333 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 6 Mar 2025 22:52:34 +0100 Subject: [PATCH 2/3] - Fix markdown formatting in Compile_firmware.mdx --- docs/docs/developer/Compile_firmware.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/docs/developer/Compile_firmware.mdx b/docs/docs/developer/Compile_firmware.mdx index c932d31048..b378e862fb 100644 --- a/docs/docs/developer/Compile_firmware.mdx +++ b/docs/docs/developer/Compile_firmware.mdx @@ -52,17 +52,17 @@ Note that this is not the `latest` version of the NRF Connect toolchain or SDK. width="75%" /> -Board target shoud be: -xiao_ble/nrf52840/sense +Board target shoud be: +xiao_ble/nrf52840/sense 2. Scroll to the bottom and click "Build Configuration." This will start the nRFConnect SDK building your firmware file. A VSCode notification popup will notify you of the progress of your build. - Build Configuration + Build Configuration --- @@ -74,7 +74,7 @@ Once the build succeeds, you will find the `zephyr.uf2` file in the directory co ### Step 5: Flash the Firmware -Follow the steps as described [here](docs/get_started/Flash_device.mdx) using the generated file +Follow the steps as described [here](../get_started/Flash_device) using the generated file --- From ddd6bd44426683c9d5f5764e0da55b1d5ad86ae1 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Mon, 10 Mar 2025 19:51:06 +0100 Subject: [PATCH 3/3] docs: Update Backend Setup documentation with direct API key links and improved guidance --- docs/docs/developer/backend/Backend_Setup.mdx | 59 +++++++++---------- 1 file changed, 28 insertions(+), 31 deletions(-) diff --git a/docs/docs/developer/backend/Backend_Setup.mdx b/docs/docs/developer/backend/Backend_Setup.mdx index 0e5e214738..81ef6130bf 100644 --- a/docs/docs/developer/backend/Backend_Setup.mdx +++ b/docs/docs/developer/backend/Backend_Setup.mdx @@ -12,17 +12,17 @@ Before you start, make sure you have the following: - **Google Cloud Project:** You need a Google Cloud project with Firebase enabled. If you've already set up Firebase for the Omi app, you're good to go. - **API Keys: 🔑** Obtain API keys for: - - **OpenAI:** For AI language models ([platform.openai.com](https://platform.openai.com/)) - - **Deepgram:** For speech-to-text ([deepgram.com](https://deepgram.com/)) - - **Redis:** Upstash is recommended ([upstash.com](https://upstash.com/)) - - **Pinecone:** For vector database; use "text-embedding-3-large" model ([pinecone.io](https://www.pinecone.io/)) - - **Modal: [optional]** For serverless deployment ([modal.com](https://modal.com/)) - - **Hugging Face:** For voice activity detection ([huggingface.co](https://huggingface.co/)) - - **GitHub:[optional]** For firmware updates ([github.com](https://github.com/)) - - **Google Maps API Key: [optional]** For location features ([mapsplatform.google.com](https://mapsplatform.google.com/)) - - **Typesense Credentials:** For search functionality ([typesense.org](https://typesense.org/)) - - **Stripe Credentials: [optional]** For paid apps payment processing ([stripe.com](https://stripe.com/)) - + - **OpenAI:** For AI language models ([OpenAI API Keys](https://platform.openai.com/settings/organization/api-keys)) + - **Deepgram:** For speech-to-text ([Deepgram API Keys](https://console.deepgram.com/api-keys)) + - **Redis:** Upstash is recommended ([Upstash Redis Console](https://console.upstash.com/)) + - **Pinecone:** For vector database; use "text-embedding-3-large" model ([Pinecone API Keys](https://app.pinecone.io/organizations/-/projects/-/api-keys)) + - **Modal: [optional]** For serverless deployment ([Modal Dashboard](https://modal.com/settings#tokens)) + - **Hugging Face:** For voice activity detection ([Hugging Face Access Tokens](https://huggingface.co/settings/tokens)) + - **GitHub:[optional]** For firmware updates ([GitHub Personal Access Tokens](https://github.com/settings/tokens)) + - **Google Maps API Key: [optional]** For location features ([Google Maps API Key](https://console.cloud.google.com/google/maps-apis/credentials)) + - **Typesense Credentials:** For search functionality ([Typesense Cloud Dashboard](https://cloud.typesense.org/clusters)) + - **Stripe Credentials: [optional]** For paid apps payment processing ([Stripe API Keys](https://dashboard.stripe.com/apikeys)) + **Note:** If you are not very experienced in backend development, we recommend installing [Homebrew](https://docs.brew.sh/Installation) (for macOS or Linux) or [Chocolatey](https://chocolatey.org/install) (for Windows). #### Video Walkthrough @@ -42,8 +42,8 @@ Before you start, make sure you have the following: - Select your project - Navigate to APIs & Services -> Library - Enable the following APIs: - - Cloud Resource Manager API - - Firebase Management API + - [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com) + - [Firebase Management API](https://console.cloud.google.com/apis/library/firebase.googleapis.com) 3. **Authenticate with Google Cloud: 🔐** - Open your terminal @@ -81,7 +81,7 @@ Before you start, make sure you have the following: ```bash git clone https://github.com/BasedHardware/Omi.git cd Omi - cd backend + cd backend ``` 3. **Set up Pusher Service: 📡 [Optional]** @@ -119,15 +119,15 @@ Before you start, make sure you have the following: cp .env.template .env ``` - Open the `.env` file and fill in the following: - - **OPENAI_API_KEY:** Obtained from your OpenAI account - - **DEEPGRAM_API_KEY:** Obtained from your Deepgram account - - **Redis Credentials:** Host, port, username, and password for your Redis instance - - **Modal API Key:** Obtained from your Modal account + - **OPENAI_API_KEY:** Obtained from your [OpenAI API Settings](https://platform.openai.com/settings/organization/api-keys) + - **DEEPGRAM_API_KEY:** Obtained from your [Deepgram Console](https://console.deepgram.com/api-keys) + - **Redis Credentials:** Host, port, username, and password from your [Upstash Redis Console](https://console.upstash.com/) + - **Modal API Key:** Obtained from your [Modal Dashboard](https://modal.com/settings#tokens) - **ADMIN_KEY:** Set to a temporary value (e.g., `123`) for local development - **HOSTED_PUSHER_API_URL:** Endpoint of your hosted pusher service (if you are using it, see step 3) - - **Typesense Credentials:** Host, port, and API key for your Typesense instance (if you are using it, see step 4) + - **Typesense Credentials:** Host, port, and API key from your [Typesense Cloud Dashboard](https://cloud.typesense.org/clusters) - **NO_SOCKET_TIMEOUT: (Optional)** Set to `True` to disable the socket timeout for the backend server (socket will stay connected for as long as the app is open) - - **Other API Keys:** Fill in any other API keys required by your integrations (e.g., Google Maps API key) + - **Other API Keys:** Fill in any other API keys required by your integrations (e.g., [Google Maps API key](https://console.cloud.google.com/google/maps-apis/credentials)) 5. **Install Python Dependencies: 📚** - In your terminal (inside the backend directory), run: @@ -142,14 +142,14 @@ Before you start, make sure you have the following: - Follow their instructions to authenticate Ngrok with your account - During the onboarding, Ngrok will provide you with a command to create a tunnel to your localhost. Modify the port in the command to `8000` (the default port for the backend). For example: ```bash - ngrok http --domain=example.ngrok-free.app 8000 + ngrok http --domain=example.ngrok-free.app 8000 ``` - Run this command in your terminal. Ngrok will provide you with a public URL (like `https://example.ngrok-free.app`) that points to your local backend 2. **Start the Backend Server: 🖥️** - In your terminal, run: ```bash - uvicorn main:app --reload --env-file .env + uvicorn main:app --reload --env-file .env ``` - `--reload` automatically restarts the server when code changes are saved, making development easier - `--env-file .env` loads environment variables from your `.env` file @@ -178,21 +178,19 @@ Now, your Omi app should be successfully connected to the locally running backen Here's a detailed explanation of each environment variable you need to define in your `.env` file: -- **`HUGGINGFACE_TOKEN`:** Your Hugging Face Hub API token, used to download models for speech processing (like voice activity detection) +- **`HUGGINGFACE_TOKEN`:** Your [Hugging Face Hub API token](https://huggingface.co/settings/tokens), used to download models for speech processing (like voice activity detection) - **`BUCKET_SPEECH_PROFILES`:** The name of the Google Cloud Storage bucket where user speech profiles are stored - **`BUCKET_BACKUPS`:** The name of the Google Cloud Storage bucket used for backups (if applicable) -- **`GOOGLE_APPLICATION_CREDENTIALS`:** The path to your Google Cloud service account credentials file (`google-credentials.json`). This file is generated in step 3 of **I. Setting Up Google Cloud & - Firebase** -- **`PINECONE_API_KEY`:** Your Pinecone API key, used for vector database operations. Storing Memory Embeddings: Each memory is converted into a numerical representation (embedding). Pinecone - efficiently stores these embeddings and allows Omi to quickly find the most relevant memories related to a user's query +- **`GOOGLE_APPLICATION_CREDENTIALS`:** The path to your [Google Cloud service account credentials file](https://console.cloud.google.com/iam-admin/serviceaccounts) (`google-credentials.json`). This is generated in step 3 of **I. Setting Up Google Cloud & Firebase** +- **`PINECONE_API_KEY`:** Your [Pinecone API key](https://app.pinecone.io/organizations/-/projects/-/api-keys), used for vector database operations. Storing Memory Embeddings: Each memory is converted into a numerical representation (embedding). Pinecone efficiently stores these embeddings and allows Omi to quickly find the most relevant memories related to a user's query - **`PINECONE_INDEX_NAME`:** The name of your Pinecone index where memory embeddings are stored - **`REDIS_DB_HOST`:** The host address of your Redis instance - **`REDIS_DB_PORT`:** The port number of your Redis instance - **`REDIS_DB_PASSWORD`:** The password for your Redis instance -- **`DEEPGRAM_API_KEY`:** Your Deepgram API key, used for real-time and pre-recorded audio transcription +- **`DEEPGRAM_API_KEY`:** Your [Deepgram API key](https://console.deepgram.com/api-keys), used for real-time and pre-recorded audio transcription - **`ADMIN_KEY`:** A temporary key used for authentication during local development (replace with a more secure method in production) -- **`OPENAI_API_KEY`:** Your OpenAI API key, used for accessing OpenAI's language models for chat, memory processing, and more -- **`GITHUB_TOKEN`:** Your GitHub personal access token, used to access GitHub's API for retrieving the latest firmware version +- **`OPENAI_API_KEY`:** Your [OpenAI API key](https://platform.openai.com/settings/organization/api-keys), used for accessing OpenAI's language models for chat, memory processing, and more +- **`GITHUB_TOKEN`:** Your [GitHub personal access token](https://github.com/settings/tokens), used to access GitHub's API for retrieving the latest firmware version - **`WORKFLOW_API_KEY`:** Your custom API key for securing communication with external workflows or integrations Make sure to replace the placeholders (``, ``, etc.) with your actual values. @@ -211,4 +209,3 @@ If you're stuck, have questions, or just want to chat about Omi: - **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. -