Skip to content

Commit

Permalink
Update README.md - add link to the doc (#1971)
Browse files Browse the repository at this point in the history
I will do aggregation to this PR all the minor doc fixes. Feel free to
merge it.

Added Reference to Documentation:
Added a clear reference to the comprehensive Backend Setup documentation
at the beginning
Added an "Additional Resources" section at the end with links to full
documentation
Improved Structure and Formatting:
Organized the content with clear headings and better formatting
Used consistent bullet points and code blocks for better readability
Added proper indentation and spacing for easier scanning
Added Missing Links:
Added direct links to all API key pages (OpenAI, Deepgram, etc.)
Added links to installation resources (pip, Firebase, etc.)
Added links to specific Google Cloud API pages
Enhanced Instructions:
Provided platform-specific instructions (Mac, Windows, Nix)
Added more detailed explanations for each step
Improved troubleshooting information
Added Context:
Clarified why certain steps are necessary
Added explanations for environment variables and configuration
  • Loading branch information
beastoin authored Mar 11, 2025
2 parents e30a686 + ddd6bd4 commit 591226a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 40 deletions.
2 changes: 1 addition & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
@@ -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
```
Expand Down
16 changes: 8 additions & 8 deletions docs/docs/developer/Compile_firmware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<img
src="../../static/images/build_configuration_button.png"
alt="Build Configuration"
width="75%"
/>
<img
src="../../static/images/build_configuration_button.png"
alt="Build Configuration"
width="75%"
/>

---

Expand All @@ -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

---

Expand Down
59 changes: 28 additions & 31 deletions docs/docs/developer/backend/Backend_Setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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]**
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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 (`<api-key>`, `<bucket-name>`, etc.) with your actual values.
Expand All @@ -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.

0 comments on commit 591226a

Please sign in to comment.