diff --git a/docs/docs.json b/docs/docs.json index c4b9d24025..0c208e1815 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -13,9 +13,9 @@ { "group": "Get Started", "pages": [ - "docs/get_started/introduction", - "docs/get_started/Flash_device", - "getstartedwithomi" + "docs/get-started/introduction", + "docs/get-started/flash-device", + "get-started-with-omi" ] }, { @@ -24,32 +24,32 @@ { "group": "Apps", "pages": [ - "docs/developer/apps/Introduction", - "docs/developer/apps/PromptBased", - "docs/developer/apps/Integrations", - "docs/developer/apps/AudioStreaming", - "docs/developer/apps/Import", - "docs/developer/apps/Submitting", - "docs/developer/apps/Oauth", - "docs/developer/apps/Notifications" + "docs/developer/apps/introduction", + "docs/developer/apps/prompt-based", + "docs/developer/apps/integrations", + "docs/developer/apps/audio-streaming", + "docs/developer/apps/import", + "docs/developer/apps/submitting", + "docs/developer/apps/oauth", + "docs/developer/apps/notifications" ] }, - "docs/developer/AppSetup", + "docs/developer/app-setup", { "group": "Backend", "pages": [ - "docs/developer/backend/Backend_Setup", - "docs/developer/backend/backend_deepdive", - "docs/developer/backend/StoringMemory", + "docs/developer/backend/backend-setup", + "docs/developer/backend/backend-deepdive", + "docs/developer/backend/storing-memory", "docs/developer/backend/transcription", - "docs/developer/backend/memory_embeddings", + "docs/developer/backend/memory-embeddings", "docs/developer/backend/postprocessing" ] }, { "group": "Firmware", "pages": [ - "docs/developer/firmware/Compile_firmware" + "docs/developer/firmware/compile-firmware" ] }, { @@ -57,19 +57,19 @@ "pages": [ "docs/developer/sdk/sdk", "docs/developer/sdk/python", - "docs/developer/sdk/ReactNative", + "docs/developer/sdk/react-native", "docs/developer/sdk/swift" ] }, - "docs/developer/Protocol", - "docs/developer/Contribution", - "docs/developer/MCP", + "docs/developer/protocol", + "docs/developer/contribution", + "docs/developer/mcp", { "group": "Audio & Testing", "pages": [ - "docs/developer/savingaudio", - "docs/developer/AudioStreaming", - "docs/developer/DevKit2Testing" + "docs/developer/saving-audio", + "docs/developer/audio-streaming", + "docs/developer/devkit2-testing" ] } ] diff --git a/docs/docs/assembly/Build_the_device.mdx b/docs/docs/assembly/Build_the_device.mdx deleted file mode 100644 index ecfcab81cd..0000000000 --- a/docs/docs/assembly/Build_the_device.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: "Building the Device" -description: "Follow this step-by-step guide to build your own OMI device" ---- - -## Assembly Instructions[​](#assembly-instructions "Direct link to Assembly Instructions") - -### **Step 0: Prepare the Components**[​](#step-0-prepare-the-components "Direct link to step-0-prepare-the-components") - -1. Ensure you've purchased all required components from the [Buying Guide](https://docs.omi.me/docs/assembly/Buying_Guide). -2. Download and print the case using the provided `.stl` file: [Case Design](https://github.com/BasedHardware/omi/tree/main/omi/hardware/triangle%20v1). - * If you don't have access to a 3D printer, use a 3D printing service or check [Makerspace](https://makerspace.com/) for printing locations. - -![components](/images/docs/assembly/images/latest_assembly/components.png) - -*** - -### **Step 1: Cut the Black Wire**[​](#step-1-cut-the-black-wire "Direct link to step-1-cut-the-black-wire") - -Cut the black wire approximately **2/3" from the base**. - -![battery](/images/docs/assembly/images/latest_assembly/1.png) - -*** - -### **Step 2: Strip the Wire Ends**[​](#step-2-strip-the-wire-ends "Direct link to step-2-strip-the-wire-ends") - -Remove a small portion of insulation from both ends of the cut wire using a wire stripper. - -* Use the *28 AWG* notch for best results. - -![wire](/images/docs/assembly/images/latest_assembly/2.png) - -*** - -### **Step 3: Solder the Components**[​](#step-3-solder-the-components "Direct link to step-3-solder-the-components") - -Follow the soldering diagram to connect the battery to the board. - -![soldering](/images/docs/assembly/images/latest_assembly/3.png) - -*** - -### **Step 4: Secure the Switch**[​](#step-4-secure-the-switch "Direct link to step-4-secure-the-switch") - -Insert the switch securely into the battery connector. - -![battery](/images/docs/assembly/images/latest_assembly/4.png) ![electronics](/images/docs/assembly/images/latest_assembly/electronics.png) ![case](/images/docs/assembly/images/latest_assembly/case.png) - -*** - -### **Step 5: Assemble the Battery and Board**[​](#step-5-assemble-the-battery-and-board "Direct link to step-5-assemble-the-battery-and-board") - -Place the battery and board into the 3D-printed case. - -![case](/images/docs/assembly/images/latest_assembly/5.png) - -*** - -### **Step 6: Insert the Switch**[​](#step-6-insert-the-switch "Direct link to step-6-insert-the-switch") - -Position the switch into the notch next to the USB-C slot. - -![notch](/images/docs/assembly/images/latest_assembly/6.png) - -*** - -### **Step 7: Manage the Wires**[​](#step-7-manage-the-wires "Direct link to step-7-manage-the-wires") - -Twist the longer red wire gently to help organize it within the case. - -![twist](/images/docs/assembly/images/latest_assembly/7.png) - -*** - -### **Step 8: Curl the Wire**[​](#step-8-curl-the-wire "Direct link to step-8-curl-the-wire") - -Carefully curl the twisted wire and place it to the side to ensure it fits within the case. - -![twist](/images/docs/assembly/images/latest_assembly/8.png) - -*** - -### **Step 9: Attach the Lid**[​](#step-9-attach-the-lid "Direct link to step-9-attach-the-lid") - -Align the lid with the case using the ridges as a guide and snap it into place. - -![lid](/images/docs/assembly/images/latest_assembly/9.png) - -*** - -### **Step 10: Secure the Case**[​](#step-10-secure-the-case "Direct link to step-10-secure-the-case") - -Apply even pressure around the edges to ensure the seams snap securely into place. - -![seams](/images/docs/assembly/images/latest_assembly/10.png) - -*** - -### Charging Instructions[​](#charging-instructions "Direct link to Charging Instructions") - -**Important:** - -* OMI can only charge when it is powered on. -* The device will not charge if powered off. - -*** - -## 🎉 Congratulations\![​](#-congratulations "Direct link to 🎉 Congratulations!") - -You now have a fully assembled and functional OMI device! Enjoy exploring its features and capabilities. diff --git a/docs/docs/assembly/build-the-device.mdx b/docs/docs/assembly/build-the-device.mdx new file mode 100644 index 0000000000..3b0fe63bc9 --- /dev/null +++ b/docs/docs/assembly/build-the-device.mdx @@ -0,0 +1,90 @@ +--- +title: "Building the Device" +description: "Follow this step-by-step guide to build your own OMI device" +--- + +## Assembly Instructions + + + + 1. Ensure you've purchased all required components from the [Buying Guide](https://docs.omi.me/docs/assembly/Buying_Guide). + 2. Download and print the case using the provided `.stl` file: [Case Design](https://github.com/BasedHardware/omi/tree/main/omi/hardware/triangle%20v1). + * If you don't have access to a 3D printer, use a 3D printing service or check [Makerspace](https://makerspace.com/) for printing locations. + + ![components](/images/docs/assembly/images/latest_assembly/components.png) + + + + Cut the black wire approximately **2/3" from the base**. + + ![battery](/images/docs/assembly/images/latest_assembly/1.png) + + + + Remove a small portion of insulation from both ends of the cut wire using a wire stripper. + + * Use the *28 AWG* notch for best results. + + ![wire](/images/docs/assembly/images/latest_assembly/2.png) + + + + Follow the soldering diagram to connect the battery to the board. + + ![soldering](/images/docs/assembly/images/latest_assembly/3.png) + + + + Insert the switch securely into the battery connector. + + ![battery](/images/docs/assembly/images/latest_assembly/4.png) + ![electronics](/images/docs/assembly/images/latest_assembly/electronics.png) + ![case](/images/docs/assembly/images/latest_assembly/case.png) + + + + Place the battery and board into the 3D-printed case. + + ![case](/images/docs/assembly/images/latest_assembly/5.png) + + + + Position the switch into the notch next to the USB-C slot. + + ![notch](/images/docs/assembly/images/latest_assembly/6.png) + + + + Twist the longer red wire gently to help organize it within the case. + + ![twist](/images/docs/assembly/images/latest_assembly/7.png) + + + + Carefully curl the twisted wire and place it to the side to ensure it fits within the case. + + ![twist](/images/docs/assembly/images/latest_assembly/8.png) + + + + Align the lid with the case using the ridges as a guide and snap it into place. + + ![lid](/images/docs/assembly/images/latest_assembly/9.png) + + + + Apply even pressure around the edges to ensure the seams snap securely into place. + + ![seams](/images/docs/assembly/images/latest_assembly/10.png) + + + +### Charging Instructions + +**Important:** +* OMI can only charge when it is powered on. +* The device will not charge if powered off. + +## Congratulations! + +You now have a fully assembled and functional OMI device! Enjoy exploring its features and capabilities. diff --git a/docs/docs/assembly/Buying_Guide.mdx b/docs/docs/assembly/buying-guide.mdx similarity index 96% rename from docs/docs/assembly/Buying_Guide.mdx rename to docs/docs/assembly/buying-guide.mdx index fc6e4e0ed2..33842def6a 100644 --- a/docs/docs/assembly/Buying_Guide.mdx +++ b/docs/docs/assembly/buying-guide.mdx @@ -12,9 +12,7 @@ description: "Please note that availability and prices may vary by region." | **Wires** | - [Various options on Amazon US](https://www.amazon.com/dp/B09X4629C1) | **Varies** | | **Case** | - [3D-print design available on GitHub](https://github.com/BasedHardware/Omi/tree/main/Omi/hardware/triangle%20v1) | **Varies** | -*** - -## Notes:[​](#notes "Direct link to Notes:") +## Notes: 1. The provided links are third-party providers; we do not guarantee product availability or quality. 2. Pricing is approximate and may vary depending on your location and shipping fees. diff --git a/docs/docs/assembly/introduction.mdx b/docs/docs/assembly/introduction.mdx index 458b2f5772..29c0fd9eae 100644 --- a/docs/docs/assembly/introduction.mdx +++ b/docs/docs/assembly/introduction.mdx @@ -3,39 +3,31 @@ title: "Build Your Own OMI Device" description: "As an open-source community, we empower enthusiasts to create their own OMI devices. This guide focuses on building the **Developer Kit 1**, as the **Developer Kit 2** relies on a custom PCB and is not suited for DIY assembly." --- -*** - -## Is This Guide for You?[​](#is-this-guide-for-you "Direct link to Is This Guide for You?") +## Is This Guide for You? Building your own OMI device can be a rewarding experience but is best suited for individuals with **advanced knowledge** of soldering and PCBs. If you're confident in your skills and ready for the challenge, this guide will help you get started. -*** - -## Is It Cheaper?[​](#is-it-cheaper "Direct link to Is It Cheaper?") +## Is It Cheaper? While building your own OMI device is a great learning experience, it may not always be significantly cheaper than purchasing one directly from our [Shop](https://omi.me). The cost depends on the availability of parts in your region, shipping fees, and access to specialized tools. If cost savings are your main goal, consider comparing the price of parts and tools against the price in our shop before deciding. -*** +## Requirements -## Requirements[​](#requirements "Direct link to Requirements") - -### Skills Needed:[​](#skills-needed "Direct link to Skills Needed:") +### Skills Needed: * Soldering (both through-hole and surface-mount components) * Basic understanding of PCB design and electronics * Familiarity with microcontrollers -### Tools & Materials:[​](#tools--materials "Direct link to Tools & Materials:") +### Tools & Materials: * Soldering iron and solder * Fine-tip tweezers * Enclosure (3D printed) -*** - -## Important Notes[​](#important-notes "Direct link to Important Notes") +## Important Notes * **Safety First:** Always follow safety precautions when working with electronics and soldering equipment. * **Custom PCB for Developer Kit 2:** Due to its reliance on a custom PCB, Developer Kit 2 cannot be built without specialized manufacturing. diff --git a/docs/docs/developer/AudioStreaming.mdx b/docs/docs/developer/AudioStreaming.mdx deleted file mode 100644 index 588067c31f..0000000000 --- a/docs/docs/developer/AudioStreaming.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Real-Time Audio Streaming -description: '' ---- - -# Streaming Real-Time Audio From Device to Anywhere - -Omi allows you to stream audio bytes from your DevKit1 or DevKit2 directly to your backend or any other service, enabling you to perform various analyses and store the data. You can also define how frequently you want to receive the audio bytes. - -## Step 1: Create an Endpoint - -Create an endpoint (webhook) that can receive and process the data sent by our backend. Our backend will make a POST request to your webhook with sample_rate and uid as query parameters. The request from our backend will look like this: - -`POST /your-endpoint?sample_rate=16000&uid=user123` - -The data sent is of type octet-stream, which is essentially a stream of bytes. You can either create your own endpoint or use the example provided below. Once it's ready and deployed, proceed to the next step. - -Note: The sample rate refers to the audio samples captured per second. DevKit1 (v1.0.4 and above) and DevKit2 record audio at a sample rate of 16,000 Hz, while DevKit1 with v1.0.2 records at a sample rate of 8,000 Hz. The uid represents the unique ID assigned to the user in our system. - -## Step 2: Add the Endpoint to Developer Settings -1. Open the Omi App on your device. -2. Go to Settings and click on Developer Mode. -3. Scroll down until you see Realtime audio bytes, and set your endpoint there. -4. In the Every x seconds field, define how frequently you want to receive the bytes. For example, if you set it to 10 seconds, you will receive the audio bytes every 10 seconds. - -That's it! You should now see audio bytes arriving at your webhook. The audio bytes are raw, but you can save them as audio files by adding a WAV header to the accumulated bytes. - -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/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. -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. -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`. -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 🤝 - -We welcome contributions from the open source community! Whether it's improving documentation, adding new features, or reporting bugs, your input is valuable. Check out our [Contribution Guide](https://docs.omi.me/developer/Contribution/) for more information. - -## Support 🆘 - -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/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/MCP.mdx b/docs/docs/developer/MCP.mdx index 95c709bb3f..6942958078 100644 --- a/docs/docs/developer/MCP.mdx +++ b/docs/docs/developer/MCP.mdx @@ -3,8 +3,6 @@ title: "Model Context Protocol" description: "A Model Context Protocol server for Omi interaction and automation. This server provides tools to read, search, and manipulate Memories and Conversations." --- -import { AccordionGroup, Accordion } from 'mintlify-components'; - ## Configuration ### Usage with Claude Desktop @@ -12,61 +10,56 @@ import { AccordionGroup, Accordion } from 'mintlify-components'; Add this to your `claude_desktop_config.json`: - - -When using [uv](https://docs.astral.sh/uv/) no specific installation is needed. - -We will use [uvx](https://docs.astral.sh/uv/guides/tools/) to directly run *mcp-server-omi*. - -| If having issues instead of `"command": "uvx"`, put your whole package path (`which uvx`), then `"command": "$path"`. - -```json -"mcpServers": { - "omi": { - "command": "uvx", - "args": ["mcp-server-omi"] - } -} -``` - - - - - -Install docker, https://orbstack.dev/ is great. - -```json -"mcpServers": { - "omi": { - "command": "docker", - "args": ["run", "--rm", "-i", "josancamon19/mcp-server-omi"] - } -} -``` - - - - -Requires python >= 3.11.6. -- Check `python --version`, and `brew list --versions | grep python` (you might have other versions of python installed) -- Get the path of the python version (`which python`) or with brew - -```json -"mcpServers": { - "omi": { - "command": "/opt/homebrew/bin/python3.12", - "args": ["-m", "mcp_server_omi"] - } -} -``` - + + When using [uv](https://docs.astral.sh/uv/) no specific installation is needed. + + We will use [uvx](https://docs.astral.sh/uv/guides/tools/) to directly run *mcp-server-omi*. + + | If having issues instead of `"command": "uvx"`, put your whole package path (`which uvx`), then `"command": "$path"`. + + ```json + "mcpServers": { + "omi": { + "command": "uvx", + "args": ["mcp-server-omi"] + } + } + ``` + + + + Install docker, https://orbstack.dev/ is great. + + ```json + "mcpServers": { + "omi": { + "command": "docker", + "args": ["run", "--rm", "-i", "josancamon19/mcp-server-omi"] + } + } + ``` + + + + Requires python >= 3.11.6. + - Check `python --version`, and `brew list --versions | grep python` (you might have other versions of python installed) + - Get the path of the python version (`which python`) or with brew + + ```json + "mcpServers": { + "omi": { + "command": "/opt/homebrew/bin/python3.12", + "args": ["-m", "mcp_server_omi"] + } + } + ``` + ### Examples (langchain, openai Agents, dspy) https://github.com/BasedHardware/omi/tree/main/mcp/examples - ### Tools 1. `get_memories` - Retrieve a list of user memories @@ -111,13 +104,13 @@ https://github.com/BasedHardware/omi/tree/main/mcp/examples You can use the MCP inspector to debug the server. For uvx installations: -``` +```bash npx @modelcontextprotocol/inspector uvx mcp-server-omi ``` Or if you've installed the package in a specific directory or are developing on it: -``` +```bash cd path/to/servers/src/omi npx @modelcontextprotocol/inspector uv run mcp-server-omi ``` @@ -127,4 +120,4 @@ help you debug any issues. ## License -This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. +This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. \ No newline at end of file diff --git a/docs/docs/developer/Protocol.mdx b/docs/docs/developer/Protocol.mdx index 978ca502d4..1134f5e378 100644 --- a/docs/docs/developer/Protocol.mdx +++ b/docs/docs/developer/Protocol.mdx @@ -2,15 +2,15 @@ title: "App-device protocol" --- -## BLE Discovery[​](#ble-discovery "Direct link to BLE Discovery") +## BLE Discovery The official app discovers the device by scanning for BLE devices with the name `Omi`. -## BLE Services and Characteristics[​](#ble-services-and-characteristics "Direct link to BLE Services and Characteristics") +## BLE Services and Characteristics The Omi wearable device implements several services: -### the standard BLE [Battery Service](https://www.bluetooth.com/specifications/specs/battery-service)[​](#the-standard-ble-battery-service "Direct link to the-standard-ble-battery-service") +### the standard BLE [Battery Service](https://www.bluetooth.com/specifications/specs/battery-service) The service uses the official UUID of 0x180F and exposes the standard Battery Level characteristic with UUID 0x2A19. The characteristic supports notification to provide regular updates of the level (this does not work with firmware 1.0.x and requires at least v1.5). @@ -32,7 +32,7 @@ The main service has UUID of `19B10000-E8F2-537E-4F6C-D104768A1214` and has two * Audio data with UUID of `19B10001-E8F2-537E-4F6C-D104768A1214`, used to send the audio data from the device to the app. * Codec type with UUID of `19B10002-E8F2-537E-4F6C-D104768A1214`, determines what codec should be used to decode the audio data. -### Codec Type[​](#codec-type "Direct link to Codec Type") +### Codec Type The possible values for the codec type are: @@ -44,7 +44,7 @@ The possible values for the codec type are: Starting with version 1.0.3 of the firmware, the device default is Opus. On earlier versions it was PCM 16-bit, 8kHz, mono. -### Audio Data[​](#audio-data "Direct link to Audio Data") +### Audio Data The audio data is sent as notifications on the audio characteristic. The format of the data depends on the codec type. The data is split into audio packets, with each packet containing 160 samples. A packet could be sent in multiple value updates if it is larger than (negotiated BLE MTU - 3 bytes). Each value update has a three byte header: diff --git a/docs/docs/developer/AppSetup.mdx b/docs/docs/developer/app-setup.mdx similarity index 100% rename from docs/docs/developer/AppSetup.mdx rename to docs/docs/developer/app-setup.mdx diff --git a/docs/docs/developer/apps/AudioStreaming.mdx b/docs/docs/developer/apps/AudioStreaming.mdx deleted file mode 100644 index d41c49e3f8..0000000000 --- a/docs/docs/developer/apps/AudioStreaming.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "Real-Time Audio Streaming" -titleHidden: true ---- - -# Streaming Real-Time Audio From Device to Anywhere - -Omi allows you to stream audio bytes from your DevKit1 or DevKit2 directly to your backend or any other service, enabling you to perform various analyses and store the data. You can also define how frequently you want to receive the audio bytes. - -## Step 1: Create an Endpoint - -Create an endpoint (webhook) that can receive and process the data sent by our backend. Our backend will make a POST request to your webhook with sample_rate and uid as query parameters. The request from our backend will look like this: - -`POST /your-endpoint?sample_rate=16000&uid=user123` - -The data sent is of type octet-stream, which is essentially a stream of bytes. You can either create your own endpoint or use the example provided below. Once it's ready and deployed, proceed to the next step. - -Note: The sample rate refers to the audio samples captured per second. DevKit1 (v1.0.4 and above) and DevKit2 record audio at a sample rate of 16,000 Hz, while DevKit1 with v1.0.2 records at a sample rate of 8,000 Hz. The uid represents the unique ID assigned to the user in our system. - -## Step 2: Add the Endpoint to Developer Settings -1. Open the Omi App on your device. -2. Go to Settings and click on Developer Mode. -3. Scroll down until you see Realtime audio bytes, and set your endpoint there. -4. In the Every x seconds field, define how frequently you want to receive the bytes. For example, if you set it to 10 seconds, you will receive the audio bytes every 10 seconds. - -That's it! You should now see audio bytes arriving at your webhook. The audio bytes are raw, but you can save them as audio files by adding a WAV header to the accumulated bytes. - -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/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 🤝 - -We welcome contributions from the open source community! Whether it's improving documentation, adding new features, or reporting bugs, your input is valuable. Check out our [Contribution Guide](https://docs.omi.me/developer/Contribution/) for more information. - -## Support 🆘 - -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/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/apps/Integrations.mdx b/docs/docs/developer/apps/Integrations.mdx deleted file mode 100644 index 166129a5de..0000000000 --- a/docs/docs/developer/apps/Integrations.mdx +++ /dev/null @@ -1,204 +0,0 @@ ---- -title: Developing Integration Apps for OMI -description: "Integration apps allow OMI to interact with external services and process data in real-time. This guide will walk you through creating both Memory Creation Triggers and Real-Time Transcript Processors." ---- - -## Types of Integration Apps - -### 1. 👷 Memory Creation Triggers - -#### Video Walkthrough - - - -**Running a FastAPI app locally, not on AWS:** - - -These apps are activated when OMI creates a new memory, allowing you to process or store the memory data -externally. - -[![Memory trigger app](https://img.youtube.com/vi/Yv7gP3GZ0ME/0.jpg)](https://youtube.com/shorts/Yv7gP3GZ0ME) - -#### Example Use Cases - -- Update project management tools with conversation summaries -- Create a personalized social platform based on conversations and interests -- Generate a knowledge graph of interests, experiences, and relationships - -### 2. 🏎️ Real-Time Transcript Processors - -#### Video Walkthrough: - - -These apps process conversation transcripts as they occur, enabling real-time analysis and actions. - -[![Memory trigger app](https://img.youtube.com/vi/h4ojO3WzkxQ/0.jpg)](https://youtube.com/shorts/h4ojO3WzkxQ) - -#### Example Use Cases - -- Live conversation coaching and feedback -- Real-time web searches or fact-checking -- Emotional state analysis and supportive responses - -## Creating an Integration App - -### Step 1: Define Your App 🎯 - -Decide whether you're creating a Memory Creation Trigger or a Real-Time Transcript Processor, and outline its specific -purpose. - -### Step 2: Set Up Your Endpoint 🔗 - -Create an endpoint (webhook) that can receive and process the data sent by OMI. You can [create a test webhook](https://webhook-test.com/). The data structure will differ based on your -app type: - -#### For Memory Creation Triggers: - -Your endpoint will receive the entire memory object as a JSON payload, with a `uid` as a query parameter. Here is what to -expect: - -`POST /your-endpoint?uid=user123` - -```json - -{ - "id": 0, - "created_at": "2024-07-22T23:59:45.910559+00:00", - "started_at": "2024-07-21T22:34:43.384323+00:00", - "finished_at": "2024-07-21T22:35:43.384323+00:00", - "transcript_segments": [ - { - "text": "Segment text", - "speaker": "SPEAKER_00", - "speakerId": 0, - "is_user": false, - "start": 10.0, - "end": 20.0 - } - // More segments... - ], - "photos": [], - "structured": { - "title": "Conversation Title", - "overview": "Brief overview...", - "emoji": "🗣️", - "category": "personal", - "action_items": [ - { - "description": "Action item description", - "completed": false - } - ], - "events": [] - }, - "apps_response": [ - { - "app_id": "app-id", - "content": "App response content" - } - ], - "discarded": false -} -``` - -Your app should process this entire object and perform any necessary actions based on the full context of the memory. - -> Check the [Notion CRM Python Example](https://github.com/BasedHardware/Omi/blob/bab12a678f3cfe43ab1a7aba62645222de4378fb/apps/example/main.py#L85) -> and it's respective JSON format [here](https://github.com/BasedHardware/Omi/blob/bab12a678f3cfe43ab1a7aba62645222de4378fb/community-plugins.json#L359). - -**For Real-Time Transcript Processors:** - -Your endpoint will receive a JSON payload containing the most recently transcribed segments, with both session_id and -uid as query parameters. Here's the structure: - -`POST /your-endpoint?session_id=abc123&uid=user123` - -```json -[ - { - "text": "Segment text", - "speaker": "SPEAKER_00", - "speakerId": 0, - "is_user": false, - "start": 10.0, - "end": 20.0 - } - // More recent segments... -] -``` - -**Key points for Real-Time Transcript Processors:** - -1. Segments arrive in multiple calls as the conversation unfolds. -2. Use the session_id to maintain context across calls. -3. Implement smart logic to avoid redundant processing. -4. Consider building a complete conversation context by accumulating segments. -5. Clear processed segments to prevent re-triggering on future calls. - -Remember to handle errors gracefully and consider performance, especially for lengthy conversations! - -> Check the Realtime News checker [Python Example](https://github.com/BasedHardware/omi/blob/bab12a678f3cfe43ab1a7aba62645222de4378fb/plugins/example/main.py#L100) -> and it's respective JSON format [here](https://github.com/BasedHardware/Omi/blob/bab12a678f3cfe43ab1a7aba62645222de4378fb/community-plugins.json#L379). - -### Step 3: Test Your App 🧪 - -Time to put your app through its paces! Follow these steps to test both types of integrations: - -1. Open the OMI app on your device. -2. Go to Settings and enable Developer Mode. -3. Navigate to Developer Settings. - -#### For Memory Creation Triggers: - -4. Set your endpoint URL in the "Memory Creation Webhook" field. If you don't have an endpoint yet, [create a test webhook](https://webhook-test.com/) -5. To test without creating a new memory: - - Go to any memory detail view. - - Click on the top right corner (3 dots menu). - - In the Developer Tools section, trigger the endpoint call with existing memory data. - -[![Memory trigger app](https://img.youtube.com/vi/dYVSbEpoV0U/0.jpg)](https://youtube.com/shorts/dYVSbEpoV0U) - -#### For Real-Time Transcript Processors: - -4. Set your endpoint URL in the "Real-Time Transcript Webhook" field. -5. Start speaking to your device - your endpoint will receive real-time updates as you speak. - -[![Memory trigger app](https://img.youtube.com/vi/CHz9JnOGlTQ/0.jpg)](https://youtube.com/shorts/CHz9JnOGlTQ) - -Your endpoints are now ready to spring into action! - -For **Memory Creation Triggers**, you can test with existing memories or wait for new ones to be created. - -For **Real-Time Processors**, simply start a conversation with OMI to see your app in action. - -Happy app crafting! We can't wait to see what you create! 🎉 - -### Step 4: Submit Your App - -Submit your app using the Omi mobile app. - -The **webhook URL** should be a POST request in which the memory object is sent as a JSON payload. - -The **setup completed URL** is optional and should be a GET endpoint that returns `{'is_setup_completed': boolean}`. - -The **auth URL** is optional as well and is utilized by users to setup your app. The `uid` query paramater will be appended to this URL upon usage. - -The setup instructions can be either a link to instructions or text instructions for users on how to setup your app. - -### Setup Instructions Documentation - -When writing your setup instructions, consider including: - -1. A step-by-step setup guide -2. Screenshots (if applicable) -3. Authentication steps (if required) -4. Troubleshooting tips - -Example structure: - -**Notes:** - -- Authentication is not needed for all apps. Include only if your app requires user-specific setup or credentials. -- For apps without authentication, users can simply enable the app without additional steps. -- All your README links, when the user opens them, we'll append a `uid` query parameter to it, which you can use to - associate setup or credentials with specific users. diff --git a/docs/docs/developer/apps/Introduction.mdx b/docs/docs/developer/apps/Introduction.mdx index b827ef3c73..697da433db 100644 --- a/docs/docs/developer/apps/Introduction.mdx +++ b/docs/docs/developer/apps/Introduction.mdx @@ -44,18 +44,6 @@ Apps enable: - Task automation and integration with third-party services - Real-time conversation analysis and insights -[//]: # (With apps, OMI can be transformed into specialized tools such as:) - -[//]: # (- A personal productivity coach that extracts action items and updates task management systems) - -[//]: # (- An expert in any field, providing specialized knowledge and advice) - -[//]: # (- A real-time language translator and cultural advisor) - -[//]: # (- A personal CRM that analyzes conversations and maintains relationship histories) - -[//]: # (- A health and fitness tracker that interprets discussions about diet and exercise) - Apps allow developers to tap into OMI's conversational abilities and combine them with external data and services, opening up a world of possibilities for AI-enhanced applications. diff --git a/docs/docs/developer/apps/Notifications.mdx b/docs/docs/developer/apps/Notifications.mdx index dad92fff07..f043d45cf3 100644 --- a/docs/docs/developer/apps/Notifications.mdx +++ b/docs/docs/developer/apps/Notifications.mdx @@ -3,9 +3,9 @@ Title: "Sending Notifications with OMI" description: "Learn how to send notifications to OMI users from your applications, including direct text notifications and best practices for implementation." --- -## Types of Notifications 📬 +## Types of Notifications -### 1. 📱 Direct Text Notifications +### 1. Direct Text Notifications Direct text notifications allow you to send immediate messages to specific OMI users. This is useful for alerts, updates, or responses to user actions. @@ -19,113 +19,115 @@ Direct text notifications allow you to send immediate messages to specific OMI u ## Implementing Notifications 🛠️ -### Step 1: Set Up Authentication 🔑 - -Before sending notifications, you'll need: - -1. Your OMI App ID (`app_id`) -2. Your OMI App Secret (API Key) - -Store these securely as environment variables: -```bash -OMI_APP_ID=your_app_id_here -OMI_APP_SECRET=your_app_secret_here -``` - -### Step 2: Configure Your Endpoint 🔌 - -#### Base URL and Endpoint - -```markdown -* **Method:** `POST` -* **URL:** `/v2/integrations/{app_id}/notification` -* **Base URL:** `api.omi.me` -``` - -#### Required Headers - -```markdown -* **Authorization:** `Bearer ` -* **Content-Type:** `application/json` -* **Content-Length:** `0` -``` - -#### Query Parameters - -```markdown -* `uid` (string, **required**): The target user's OMI ID -* `message` (string, **required**): The notification text -``` - -### Step 3: Implement the Code 💻 - -Here's a complete Node.js implementation: - -```javascript -const https = require('https'); - -/** - * Sends a direct notification to an Omi user. - * @param {string} userId - The Omi user's unique ID - * @param {string} message - The notification text - * @returns {Promise} Response data or error - */ -function sendOmiNotification(userId, message) { - const appId = process.env.OMI_APP_ID; - const appSecret = process.env.OMI_APP_SECRET; - - if (!appId) throw new Error("OMI_APP_ID not set"); - if (!appSecret) throw new Error("OMI_APP_SECRET not set"); - - const options = { - hostname: 'api.omi.me', - path: `/v2/integrations/${appId}/notification?uid=${encodeURIComponent(userId)}&message=${encodeURIComponent(message)}`, - method: 'POST', - headers: { - 'Authorization': `Bearer ${appSecret}`, - 'Content-Type': 'application/json', - 'Content-Length': 0 - } - }; - - return new Promise((resolve, reject) => { - const req = https.request(options, (res) => { - let data = ''; - res.on('data', chunk => data += chunk); - res.on('end', () => { - if (res.statusCode >= 200 && res.statusCode < 300) { - try { - resolve(data ? JSON.parse(data) : {}); - } catch (e) { - resolve({ raw: data }); + + + Before sending notifications, you'll need: + + 1. Your OMI App ID (`app_id`) + 2. Your OMI App Secret (API Key) + + Store these securely as environment variables: + ```bash + OMI_APP_ID=your_app_id_here + OMI_APP_SECRET=your_app_secret_here + ``` + + + + #### Base URL and Endpoint + + ```markdown + * **Method:** `POST` + * **URL:** `/v2/integrations/{app_id}/notification` + * **Base URL:** `api.omi.me` + ``` + + #### Required Headers + + ```markdown + * **Authorization:** `Bearer ` + * **Content-Type:** `application/json` + * **Content-Length:** `0` + ``` + + #### Query Parameters + + ```markdown + * `uid` (string, **required**): The target user's OMI ID + * `message` (string, **required**): The notification text + ``` + + + + Here's a complete Node.js implementation: + + ```javascript + const https = require('https'); + + /** + * Sends a direct notification to an Omi user. + * @param {string} userId - The Omi user's unique ID + * @param {string} message - The notification text + * @returns {Promise} Response data or error + */ + function sendOmiNotification(userId, message) { + const appId = process.env.OMI_APP_ID; + const appSecret = process.env.OMI_APP_SECRET; + + if (!appId) throw new Error("OMI_APP_ID not set"); + if (!appSecret) throw new Error("OMI_APP_SECRET not set"); + + const options = { + hostname: 'api.omi.me', + path: `/v2/integrations/${appId}/notification?uid=${encodeURIComponent(userId)}&message=${encodeURIComponent(message)}`, + method: 'POST', + headers: { + 'Authorization': `Bearer ${appSecret}`, + 'Content-Type': 'application/json', + 'Content-Length': 0 + } + }; + + return new Promise((resolve, reject) => { + const req = https.request(options, (res) => { + let data = ''; + res.on('data', chunk => data += chunk); + res.on('end', () => { + if (res.statusCode >= 200 && res.statusCode < 300) { + try { + resolve(data ? JSON.parse(data) : {}); + } catch (e) { + resolve({ raw: data }); + } + } else { + reject(new Error(`API Error (${res.statusCode}): ${data}`)); } - } else { - reject(new Error(`API Error (${res.statusCode}): ${data}`)); - } + }); }); + req.on('error', reject); + req.end(); }); - req.on('error', reject); - req.end(); - }); -} -``` - -### Step 4: Test Your Implementation 🧪 - -1. Set up your environment variables: - ```bash - export OMI_APP_ID="your_app_id" - export OMI_APP_SECRET="your_app_secret" - ``` - -2. Test with a sample notification: - ```javascript - sendOmiNotification("user_id_here", "Test notification!") - .then(response => console.log("Success:", response)) - .catch(error => console.error("Error:", error)); - ``` - -3. Verify the notification appears in the user's OMI app + } + ``` + + + + 1. Set up your environment variables: + ```bash + export OMI_APP_ID="your_app_id" + export OMI_APP_SECRET="your_app_secret" + ``` + + 2. Test with a sample notification: + ```javascript + sendOmiNotification("user_id_here", "Test notification!") + .then(response => console.log("Success:", response)) + .catch(error => console.error("Error:", error)); + ``` + + 3. Verify the notification appears in the user's OMI app + + ## Best Practices 🎯 @@ -149,7 +151,7 @@ function sendOmiNotification(userId, message) { - Validate user IDs before sending - Implement request timeouts -## Troubleshooting 🔍 +## Troubleshooting �� ### Common Issues @@ -177,7 +179,7 @@ function sendOmiNotification(userId, message) { | 429 | Too many requests | Implement rate limiting | | 500 | Server error | Retry with backoff | -## Example Implementations 💡 +## Example Implementations ### 1. Task Reminder @@ -197,8 +199,8 @@ function sendServiceUpdate(userId, serviceName, status) { } ``` -## Need Help? 🤝 +## Need Help? - Check our [API Reference](https://docs.omi.me/docs/api) - Join our [Discord community](https://discord.com/invite/omi) -- Contact [support](https://docs.omi.me/docs/info/Support) \ No newline at end of file +- Contact [support](https://docs.omi.me/docs/info/Support) \ No newline at end of file diff --git a/docs/docs/developer/apps/Oauth.mdx b/docs/docs/developer/apps/Oauth.mdx index 3f67c9d537..67629fc7d8 100644 --- a/docs/docs/developer/apps/Oauth.mdx +++ b/docs/docs/developer/apps/Oauth.mdx @@ -15,75 +15,69 @@ Before you begin, ensure your application is registered with OMI and has an `App ## OAuth Flow -The OMI OAuth flow consists of the following steps: - -1. **User Authorization Request**: Your application redirects the user to the OMI OAuth authorization endpoint. -2. **User Authentication & Consent**: The user logs into their OMI account (if not already logged in) and reviews the permissions requested by your application. If they approve, they grant consent. -3. **Token Exchange & User Redirection**: After successful authentication and consent, OMI's authorization page will internally facilitate the exchange of the Firebase ID token (obtained client-side) for an OMI user ID (`uid`). The user is then redirected back to your application's **App Home URL** with the `uid` and an optional `state` parameter. - -### Step 1: Redirect User to OMI for Authorization - -Your application initiates the OAuth flow by redirecting the user's browser to OMI's authorization endpoint: - -`https://api.omi.me/v1/oauth/authorize?app_id=YOUR_APP_ID&state=YOUR_OPAQUE_STATE_STRING` - -**Parameters:** - -* `app_id` (required): Your application's unique ID. -* `state` (optional): An opaque value used to maintain state between the request and callback. This is useful for preventing CSRF attacks and can also store application-specific state. OMI will return this value to your application after the user authorizes your app. - - -### Step 2: User Authentication and Consent - -Upon visiting the `/v1/oauth/authorize` URL, the user will be presented with an OMI page where they can: -1. Log in using their Firebase credentials (Google or Apple). -2. Review the permissions your application is requesting. These permissions are derived from the capabilities configured for your app (e.g., access chat, read/create memories, etc.). -3. Grant or deny access. - -The permissions displayed are user-friendly descriptions based on your app's declared capabilities, such as: -- "Engage in chat conversations with Omi." -- "Access and manage your conversations." -- "Process audio data in real-time." -- "Trigger actions when new conversations are created." -- "Create new conversations on your behalf." -- "Access and read your stored memories." -- "Access your basic Omi profile information." (This may be shown as a default if no other specific permissions are applicable or as a general permission). - -### Step 3: Token Exchange and Redirection to Your App - -This step is primarily handled by the client-side JavaScript on the OMI authorization page after the user successfully logs in via Firebase. - -1. **Firebase Authentication**: The user authenticates with Firebase on the OMI authorization page. -2. **Token POST**: The client-side script on the OMI authorization page makes a `POST` request to: - - `POST https://api.omi.me/v1/oauth/token` - - **Request Body (form-data):** - * `firebase_id_token` (required): The ID token obtained from Firebase after successful user login on the OMI page. - * `app_id` (required): Your application's unique ID. - * `state` (optional): The `state` parameter that was initially passed to the `/v1/oauth/authorize` endpoint. - - **Response (JSON):** - If successful, the `/v1/oauth/token` endpoint responds with a JSON object containing: - ```json - { - "uid": "USER_UNIQUE_ID", - "redirect_url": "YOUR_APP_HOME_URL", - "state": "YOUR_OPAQUE_STATE_STRING_IF_PROVIDED" - } - ``` - - `uid`: The unique identifier for the OMI user. - - `redirect_url`: Your application's configured **App Home URL**. - - `state`: The `state` parameter, if it was included in the initial authorization request. - -3. **Redirection to App Home URL**: The client-side script on the OMI authorization page then uses the `redirect_url`, `uid`, and `state` from the response to redirect the user's browser to your application. - - **Example Redirect URL constructed by the client-side script:** - ``` - YOUR_APP_HOME_URL?uid=USER_UNIQUE_ID&state=YOUR_OPAQUE_STATE_STRING - ``` - -Your application, at its **App Home URL**, can then retrieve the `uid` from the query parameters to identify the user. If you used a `state` parameter, your application should validate it against the value it initially sent to protect against CSRF attacks. + + + Your application initiates the OAuth flow by redirecting the user's browser to OMI's authorization endpoint: + + `https://api.omi.me/v1/oauth/authorize?app_id=YOUR_APP_ID&state=YOUR_OPAQUE_STATE_STRING` + + **Parameters:** + * `app_id` (required): Your application's unique ID. + * `state` (optional): An opaque value used to maintain state between the request and callback. This is useful for preventing CSRF attacks and can also store application-specific state. OMI will return this value to your application after the user authorizes your app. + + + + Upon visiting the `/v1/oauth/authorize` URL, the user will be presented with an OMI page where they can: + 1. Log in using their Firebase credentials (Google or Apple). + 2. Review the permissions your application is requesting. These permissions are derived from the capabilities configured for your app (e.g., access chat, read/create memories, etc.). + 3. Grant or deny access. + + The permissions displayed are user-friendly descriptions based on your app's declared capabilities, such as: + - "Engage in chat conversations with Omi." + - "Access and manage your conversations." + - "Process audio data in real-time." + - "Trigger actions when new conversations are created." + - "Create new conversations on your behalf." + - "Access and read your stored memories." + - "Access your basic Omi profile information." (This may be shown as a default if no other specific permissions are applicable or as a general permission). + + + + This step is primarily handled by the client-side JavaScript on the OMI authorization page after the user successfully logs in via Firebase. + + 1. **Firebase Authentication**: The user authenticates with Firebase on the OMI authorization page. + + 2. **Token POST**: The client-side script on the OMI authorization page makes a `POST` request to: + `POST https://api.omi.me/v1/oauth/token` + + **Request Body (form-data):** + * `firebase_id_token` (required): The ID token obtained from Firebase after successful user login on the OMI page. + * `app_id` (required): Your application's unique ID. + * `state` (optional): The `state` parameter that was initially passed to the `/v1/oauth/authorize` endpoint. + + **Response (JSON):** + If successful, the `/v1/oauth/token` endpoint responds with a JSON object containing: + ```json + { + "uid": "USER_UNIQUE_ID", + "redirect_url": "YOUR_APP_HOME_URL", + "state": "YOUR_OPAQUE_STATE_STRING_IF_PROVIDED" + } + ``` + - `uid`: The unique identifier for the OMI user. + - `redirect_url`: Your application's configured **App Home URL**. + - `state`: The `state` parameter, if it was included in the initial authorization request. + + 3. **Redirection to App Home URL**: The client-side script on the OMI authorization page then uses the `redirect_url`, `uid`, and `state` from the response to redirect the user's browser to your application. + + **Example Redirect URL constructed by the client-side script:** + ``` + YOUR_APP_HOME_URL?uid=USER_UNIQUE_ID&state=YOUR_OPAQUE_STATE_STRING + ``` + + Your application, at its **App Home URL**, can then retrieve the `uid` from the query parameters to identify the user. If you used a `state` parameter, your application should validate it against the value it initially sent to protect against CSRF attacks. + + ## Automatic App Enablement diff --git a/docs/docs/developer/apps/PromptBased.mdx b/docs/docs/developer/apps/PromptBased.mdx deleted file mode 100644 index 324e670026..0000000000 --- a/docs/docs/developer/apps/PromptBased.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "Prompt-Based Apps" ---- - -# Developing Prompt-Based Apps for OMI - -Prompt-based apps allow you to customize OMI's behavior and enhance its ability to process information. This guide -will walk you through creating both Chat Prompts and Memory Prompts. - -## Types of Prompt-Based Apps - -### 1. 💬 Chat Prompts - -Chat prompts alter OMI's conversational style and knowledge base. They allow you to create specialized versions of -OMI for different contexts or expertise areas. - -[![Chat app](https://img.youtube.com/vi/k1XhccNDT94/0.jpg)](https://youtube.com/shorts/k1XhccNDT94) - -#### Example Use Case - -Create a app that makes OMI communicate like a specific expert or professional in a given field, such as a -historian, scientist, or creative writer. - -### 2. 🧠 Memory Prompts - -Memory prompts analyze conversations and extract specific information based on predefined criteria. They're useful for -summarization, key point extraction, or identifying action items from discussions. - -[![Memory app](https://img.youtube.com/vi/Y3ehX_ueQmE/0.jpg)](https://youtube.com/shorts/Y3ehX_ueQmE) - -#### Example Use Case - -Develop a app that extracts action items from a meeting transcript and compiles them into a to-do list. - -Note: It's possible to create apps that combine both chat and memory capabilities for more comprehensive -functionality. - -## Creating a Prompt-Based App - -### Step 1: Define Your App - -Decide whether you're creating a Chat Prompt, a Memory Prompt, or a combination of both, and outline its specific -purpose. - -### Step 2: Write Your Prompt - -Craft your prompt carefully. For Chat Prompts, focus on defining the personality and knowledge base. For Memory Prompts, -clearly specify the information to be extracted and how it should be formatted. - -### Step 3: Test Your App - -Before making your app public, it's crucial to test your app to ensure it behaves as expected. - -#### For Memory Prompts: - -1. Download the OMI app on your device. -2. Enable developer settings in the app. -3. Open a memory within the app. -4. Click in the top right corner (3 dots menu). -5. In the developer tools section, you can run your prompt to test its functionality. - -[![Testing Prompts In-app](https://img.youtube.com/vi/MODjSoTMAh0/0.jpg)](https://youtube.com/shorts/MODjSoTMAh0) - -#### For Chat Prompts: - -Create a private app and use the bot normally. - -### Step 4: Release Your App - -Once you're satisfied with your app's performance, you'll need to change your apps visibility to public or submit your app if you haven't already. Your app should be reviewed within 24 hours. diff --git a/docs/docs/developer/apps/audio-streaming.mdx b/docs/docs/developer/apps/audio-streaming.mdx new file mode 100644 index 0000000000..d00403de43 --- /dev/null +++ b/docs/docs/developer/apps/audio-streaming.mdx @@ -0,0 +1,69 @@ +--- +title: "Real-Time Audio Streaming" +titleHidden: true +--- + +# Streaming Real-Time Audio From Device to Anywhere + +Omi allows you to stream audio bytes from your DevKit1 or DevKit2 directly to your backend or any other service, enabling you to perform various analyses and store the data. You can also define how frequently you want to receive the audio bytes. + + + + Create an endpoint (webhook) that can receive and process the data sent by our backend. Our backend will make a POST request to your webhook with sample_rate and uid as query parameters. The request from our backend will look like this: + + `POST /your-endpoint?sample_rate=16000&uid=user123` + + The data sent is of type octet-stream, which is essentially a stream of bytes. You can either create your own endpoint or use the example provided below. Once it's ready and deployed, proceed to the next step. + + Note: The sample rate refers to the audio samples captured per second. DevKit1 (v1.0.4 and above) and DevKit2 record audio at a sample rate of 16,000 Hz, while DevKit1 with v1.0.2 records at a sample rate of 8,000 Hz. The uid represents the unique ID assigned to the user in our system. + + + + 1. Open the Omi App on your device. + 2. Go to Settings and click on Developer Mode. + 3. Scroll down until you see Realtime audio bytes, and set your endpoint there. + 4. In the Every x seconds field, define how frequently you want to receive the bytes. For example, if you set it to 10 seconds, you will receive the audio bytes every 10 seconds. + + That's it! You should now see audio bytes arriving at your webhook. The audio bytes are raw, but you can save them as audio files by adding a WAV header to the accumulated bytes. + + + +## Example: Saving Audio Bytes as Audio Files in Google Cloud Storage + + + + 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. + + + + 1. Fork the example repository from [github.com/mdmohsin7/omi-audio-streaming](https://github.com/mdmohsin7/omi-audio-streaming). + 2. Clone the repository to your local machine. + + + + 1. 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. + 2. 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. + + + + 1. Once the deployment is complete, set the endpoint in the Developer Settings of the Omi App under Realtime audio bytes. + 2. The endpoint should be the URL where you deployed the example + `/audio`. + 3. 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 🤝 + +We welcome contributions from the open source community! Whether it's improving documentation, adding new features, or reporting bugs, your input is valuable. Check out our [Contribution Guide](https://docs.omi.me/developer/Contribution/) for more information. + +## Support 🆘 + +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/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/apps/integration.mdx b/docs/docs/developer/apps/integration.mdx new file mode 100644 index 0000000000..967156d40d --- /dev/null +++ b/docs/docs/developer/apps/integration.mdx @@ -0,0 +1,202 @@ +--- +title: Developing Integration Apps for OMI +description: "Integration apps allow OMI to interact with external services and process data in real-time. This guide will walk you through creating both Memory Creation Triggers and Real-Time Transcript Processors." +--- + +## Types of Integration Apps + +### 1. Memory Creation Triggers + +#### Video Walkthrough + + + +**Running a FastAPI app locally, not on AWS:** + + +These apps are activated when OMI creates a new memory, allowing you to process or store the memory data +externally. + +[![Memory trigger app](https://img.youtube.com/vi/Yv7gP3GZ0ME/0.jpg)](https://youtube.com/shorts/Yv7gP3GZ0ME) + +#### Example Use Cases + +- Update project management tools with conversation summaries +- Create a personalized social platform based on conversations and interests +- Generate a knowledge graph of interests, experiences, and relationships + +### 2. Real-Time Transcript Processors + +#### Video Walkthrough: + + +These apps process conversation transcripts as they occur, enabling real-time analysis and actions. + +[![Memory trigger app](https://img.youtube.com/vi/h4ojO3WzkxQ/0.jpg)](https://youtube.com/shorts/h4ojO3WzkxQ) + +#### Example Use Cases + +- Live conversation coaching and feedback +- Real-time web searches or fact-checking +- Emotional state analysis and supportive responses + +## Creating an Integration App + + + + Decide whether you're creating a Memory Creation Trigger or a Real-Time Transcript Processor, and outline its specific + purpose. + + + + Create an endpoint (webhook) that can receive and process the data sent by OMI. You can [create a test webhook](https://webhook-test.com/). The data structure will differ based on your + app type: + + #### For Memory Creation Triggers: + + Your endpoint will receive the entire memory object as a JSON payload, with a `uid` as a query parameter. Here is what to + expect: + + `POST /your-endpoint?uid=user123` + + ```json + { + "id": 0, + "created_at": "2024-07-22T23:59:45.910559+00:00", + "started_at": "2024-07-21T22:34:43.384323+00:00", + "finished_at": "2024-07-21T22:35:43.384323+00:00", + "transcript_segments": [ + { + "text": "Segment text", + "speaker": "SPEAKER_00", + "speakerId": 0, + "is_user": false, + "start": 10.0, + "end": 20.0 + } + // More segments... + ], + "photos": [], + "structured": { + "title": "Conversation Title", + "overview": "Brief overview...", + "emoji": "🗣️", + "category": "personal", + "action_items": [ + { + "description": "Action item description", + "completed": false + } + ], + "events": [] + }, + "apps_response": [ + { + "app_id": "app-id", + "content": "App response content" + } + ], + "discarded": false + } + ``` + + Your app should process this entire object and perform any necessary actions based on the full context of the memory. + + > Check the [Notion CRM Python Example](https://github.com/BasedHardware/Omi/blob/bab12a678f3cfe43ab1a7aba62645222de4378fb/apps/example/main.py#L85) + > and it's respective JSON format [here](https://github.com/BasedHardware/Omi/blob/bab12a678f3cfe43ab1a7aba62645222de4378fb/community-plugins.json#L359). + + **For Real-Time Transcript Processors:** + + Your endpoint will receive a JSON payload containing the most recently transcribed segments, with both session_id and + uid as query parameters. Here's the structure: + + `POST /your-endpoint?session_id=abc123&uid=user123` + + ```json + [ + { + "text": "Segment text", + "speaker": "SPEAKER_00", + "speakerId": 0, + "is_user": false, + "start": 10.0, + "end": 20.0 + } + // More recent segments... + ] + ``` + + **Key points for Real-Time Transcript Processors:** + + 1. Segments arrive in multiple calls as the conversation unfolds. + 2. Use the session_id to maintain context across calls. + 3. Implement smart logic to avoid redundant processing. + 4. Consider building a complete conversation context by accumulating segments. + 5. Clear processed segments to prevent re-triggering on future calls. + + Remember to handle errors gracefully and consider performance, especially for lengthy conversations! + + > Check the Realtime News checker [Python Example](https://github.com/BasedHardware/omi/blob/bab12a678f3cfe43ab1a7aba62645222de4378fb/plugins/example/main.py#L100) + > and it's respective JSON format [here](https://github.com/BasedHardware/Omi/blob/bab12a678f3cfe43ab1a7aba62645222de4378fb/community-plugins.json#L379). + + + + Time to put your app through its paces! Follow these steps to test both types of integrations: + + 1. Open the OMI app on your device. + 2. Go to Settings and enable Developer Mode. + 3. Navigate to Developer Settings. + + #### For Memory Creation Triggers: + + 4. Set your endpoint URL in the "Memory Creation Webhook" field. If you don't have an endpoint yet, [create a test webhook](https://webhook-test.com/) + 5. To test without creating a new memory: + - Go to any memory detail view. + - Click on the top right corner (3 dots menu). + - In the Developer Tools section, trigger the endpoint call with existing memory data. + + [![Memory trigger app](https://img.youtube.com/vi/dYVSbEpoV0U/0.jpg)](https://youtube.com/shorts/dYVSbEpoV0U) + + #### For Real-Time Transcript Processors: + + 4. Set your endpoint URL in the "Real-Time Transcript Webhook" field. + 5. Start speaking to your device - your endpoint will receive real-time updates as you speak. + + [![Memory trigger app](https://img.youtube.com/vi/CHz9JnOGlTQ/0.jpg)](https://youtube.com/shorts/CHz9JnOGlTQ) + + Your endpoints are now ready to spring into action! + + For **Memory Creation Triggers**, you can test with existing memories or wait for new ones to be created. + + For **Real-Time Processors**, simply start a conversation with OMI to see your app in action. + + + + Submit your app using the Omi mobile app. + + The **webhook URL** should be a POST request in which the memory object is sent as a JSON payload. + + The **setup completed URL** is optional and should be a GET endpoint that returns `{'is_setup_completed': boolean}`. + + The **auth URL** is optional as well and is utilized by users to setup your app. The `uid` query paramater will be appended to this URL upon usage. + + The setup instructions can be either a link to instructions or text instructions for users on how to setup your app. + + ### Setup Instructions Documentation + + When writing your setup instructions, consider including: + + 1. A step-by-step setup guide + 2. Screenshots (if applicable) + 3. Authentication steps (if required) + 4. Troubleshooting tips + + **Notes:** + - Authentication is not needed for all apps. Include only if your app requires user-specific setup or credentials. + - For apps without authentication, users can simply enable the app without additional steps. + - All your README links, when the user opens them, we'll append a `uid` query parameter to it, which you can use to + associate setup or credentials with specific users. + + + +Happy app crafting! We can't wait to see what you create! \ No newline at end of file diff --git a/docs/docs/developer/apps/prompt-based.mdx b/docs/docs/developer/apps/prompt-based.mdx new file mode 100644 index 0000000000..1dae5eb3ff --- /dev/null +++ b/docs/docs/developer/apps/prompt-based.mdx @@ -0,0 +1,72 @@ +--- +title: "Prompt-Based Apps" +--- + +# Developing Prompt-Based Apps for OMI + +Prompt-based apps allow you to customize OMI's behavior and enhance its ability to process information. This guide +will walk you through creating both Chat Prompts and Memory Prompts. + +## Types of Prompt-Based Apps + +### 1. Chat Prompts + +Chat prompts alter OMI's conversational style and knowledge base. They allow you to create specialized versions of +OMI for different contexts or expertise areas. + +[![Chat app](https://img.youtube.com/vi/k1XhccNDT94/0.jpg)](https://youtube.com/shorts/k1XhccNDT94) + +#### Example Use Case + +Create a app that makes OMI communicate like a specific expert or professional in a given field, such as a +historian, scientist, or creative writer. + +### 2. Memory Prompts + +Memory prompts analyze conversations and extract specific information based on predefined criteria. They're useful for +summarization, key point extraction, or identifying action items from discussions. + +[![Memory app](https://img.youtube.com/vi/Y3ehX_ueQmE/0.jpg)](https://youtube.com/shorts/Y3ehX_ueQmE) + +#### Example Use Case + +Develop a app that extracts action items from a meeting transcript and compiles them into a to-do list. + +Note: It's possible to create apps that combine both chat and memory capabilities for more comprehensive +functionality. + +## Creating a Prompt-Based App + + + + Decide whether you're creating a Chat Prompt, a Memory Prompt, or a combination of both, and outline its specific + purpose. + + + + Craft your prompt carefully. For Chat Prompts, focus on defining the personality and knowledge base. For Memory Prompts, + clearly specify the information to be extracted and how it should be formatted. + + + + Before making your app public, it's crucial to test your app to ensure it behaves as expected. + + #### For Memory Prompts: + + 1. Download the OMI app on your device. + 2. Enable developer settings in the app. + 3. Open a memory within the app. + 4. Click in the top right corner (3 dots menu). + 5. In the developer tools section, you can run your prompt to test its functionality. + + [![Testing Prompts In-app](https://img.youtube.com/vi/MODjSoTMAh0/0.jpg)](https://youtube.com/shorts/MODjSoTMAh0) + + #### For Chat Prompts: + + Create a private app and use the bot normally. + + + + Once you're satisfied with your app's performance, you'll need to change your apps visibility to public or submit your app if you haven't already. Your app should be reviewed within 24 hours. + + \ No newline at end of file diff --git a/docs/docs/developer/audio-streaming.mdx b/docs/docs/developer/audio-streaming.mdx new file mode 100644 index 0000000000..07ff467dd3 --- /dev/null +++ b/docs/docs/developer/audio-streaming.mdx @@ -0,0 +1,69 @@ +--- +title: Real-Time Audio Streaming +description: '' +--- + +# Streaming Real-Time Audio From Device to Anywhere + +Omi allows you to stream audio bytes from your DevKit1 or DevKit2 directly to your backend or any other service, enabling you to perform various analyses and store the data. You can also define how frequently you want to receive the audio bytes. + + + + Create an endpoint (webhook) that can receive and process the data sent by our backend. Our backend will make a POST request to your webhook with sample_rate and uid as query parameters. The request from our backend will look like this: + + `POST /your-endpoint?sample_rate=16000&uid=user123` + + The data sent is of type octet-stream, which is essentially a stream of bytes. You can either create your own endpoint or use the example provided below. Once it's ready and deployed, proceed to the next step. + + Note: The sample rate refers to the audio samples captured per second. DevKit1 (v1.0.4 and above) and DevKit2 record audio at a sample rate of 16,000 Hz, while DevKit1 with v1.0.2 records at a sample rate of 8,000 Hz. The uid represents the unique ID assigned to the user in our system. + + + + 1. Open the Omi App on your device. + 2. Go to Settings and click on Developer Mode. + 3. Scroll down until you see Realtime audio bytes, and set your endpoint there. + 4. In the Every x seconds field, define how frequently you want to receive the bytes. For example, if you set it to 10 seconds, you will receive the audio bytes every 10 seconds. + + That's it! You should now see audio bytes arriving at your webhook. The audio bytes are raw, but you can save them as audio files by adding a WAV header to the accumulated bytes. + + + +## Example: Saving Audio Bytes as Audio Files in Google Cloud Storage + + + + 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. + + + + 1. Fork the example repository from [github.com/mdmohsin7/omi-audio-streaming](https://github.com/mdmohsin7/omi-audio-streaming). + 2. Clone the repository to your local machine. + + + + 1. 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. + 2. 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. + + + + 1. Once the deployment is complete, set the endpoint in the Developer Settings of the Omi App under Realtime audio bytes. + 2. The endpoint should be the URL where you deployed the example + `/audio`. + 3. 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 + +We welcome contributions from the open source community! Whether it's improving documentation, adding new features, or reporting bugs, your input is valuable. Check out our [Contribution Guide](https://docs.omi.me/developer/Contribution/) for more information. + +## Support + +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/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/backend/backend_deepdive.mdx b/docs/docs/developer/backend/backend-deepdive.mdx similarity index 98% rename from docs/docs/developer/backend/backend_deepdive.mdx rename to docs/docs/developer/backend/backend-deepdive.mdx index 2da94228a1..947397d21b 100644 --- a/docs/docs/developer/backend/backend_deepdive.mdx +++ b/docs/docs/developer/backend/backend-deepdive.mdx @@ -3,7 +3,7 @@ title: "Backend Deep Dive" description: "Welcome to the Omi backend! This document provides a comprehensive overview of Omi's architecture and code, guiding you through its key components, functionalities, and how it all works together to power a unique and intelligent AI assistant experience." --- -## Understanding the Omi Ecosystem 🗺️ +## Understanding the Omi Ecosystem Omi is a multimodal AI assistant designed to understand and interact with users in a way that's both intelligent and human-centered. The backend plays a crucial role in this by: @@ -20,15 +20,15 @@ This deep dive will walk you through the **core elements** of Omi's backend, pro You can click on the image to view it in full size and zoom in for more detail. -## The Flow of Information: From User Interaction to Memory 🌊 +## The Flow of Information: From User Interaction to Memory Let's trace the journey of a typical interaction with Omi, focusing on how audio recordings are transformed into lasting memories: -### A. User Initiates a Recording 🎤 +### A. User Initiates a Recording 1. **Recording Audio:** The user starts a recording session using the Omi app, capturing a conversation or their thoughts. -### B. Real-Time Transcription with Deepgram 🎧 +### B. Real-Time Transcription with Deepgram 2. **WebSocket Connection:** The Omi app establishes a real-time connection with the backend using WebSockets (at the `/listen` endpoint in `routers/transcribe.py`). 3. **Streaming Audio:** The app streams audio data continuously through the WebSocket to the backend. @@ -125,7 +125,7 @@ Pinecone's specialized vector search capabilities are essential for: - **Efficient Search:** Quickly retrieving relevant memories from a large collection. - **Scalability:** Handling the growing number of memory embeddings as the user creates more memories. -### 3. `utils/llm.py`: The AI Maestro 🧠 +### 3. `utils/llm.py`: The AI Maestro This module is where the power of OpenAI's LLMs is harnessed for a wide range of tasks. It's the core of Omi's intelligence! diff --git a/docs/docs/developer/backend/Backend_Setup.mdx b/docs/docs/developer/backend/backend-setup.mdx similarity index 93% rename from docs/docs/developer/backend/Backend_Setup.mdx rename to docs/docs/developer/backend/backend-setup.mdx index 27a78c3586..ac55c4ecd0 100644 --- a/docs/docs/developer/backend/Backend_Setup.mdx +++ b/docs/docs/developer/backend/backend-setup.mdx @@ -3,12 +3,12 @@ title: "Backend Setup" description: "Welcome to the Omi backend setup guide! Omi is an innovative, multimodal AI assistant that combines cutting-edge technologies to provide a seamless user experience. This guide will help you set up the backend infrastructure that powers Omi's intelligent capabilities." --- -## Prerequisites 📋 +## Prerequisites 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: +- **API Keys:** Obtain API keys for: - **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/)) @@ -27,7 +27,7 @@ Before you start, make sure you have the following: -## I. Setting Up Google Cloud & Firebase ☁️ +## I. Setting Up Google Cloud & Firebase 1. **Install Google Cloud SDK:** - **Mac (using brew):** `brew install google-cloud-sdk` @@ -42,7 +42,7 @@ Before you start, make sure you have the following: - [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: 🔐** +3. **Authenticate with Google Cloud:** - Open your terminal - Run the following commands one by one, replacing `` with your Google Cloud project ID: ```bash @@ -63,7 +63,7 @@ Before you start, make sure you have the following: ## II. Backend Setup 🛠️ -1. **Install Python & Dependencies: 🐍** +1. **Install Python & Dependencies:** - **Mac (using brew):** `brew install python` - **Nix Envdir:** Python is pre-installed - **Windows (using choco):** `choco install python` @@ -81,7 +81,7 @@ Before you start, make sure you have the following: - **Install All Required Dependencies:** - **All Platforms:** `brew install -r requirements.txt` -2. **Clone the Backend Repository: 📂** +2. **Clone the Backend Repository:** - Open your terminal and navigate to your desired directory - Clone the Omi backend repository: ```bash @@ -90,7 +90,7 @@ Before you start, make sure you have the following: cd backend ``` -3. **Set up Pusher Service: 📡 [Optional]** +3. **Set up Pusher Service: [Optional]** - You don't need to have the Pusher Service running if you do not intend to use the webhooks feature - Navigate to the pusher directory: ```bash @@ -119,7 +119,7 @@ Before you start, make sure you have the following: - Set the `TYPESENSE_HOST`, `TYPESENSE_HOST_PORT` and `TYPESENSE_API_KEY` environment variables in the `.env` file to the host URL and API key provided by Typesense -5. **Set up the Environment File: 📝** +5. **Set up the Environment File:** - Create a copy of the `.env.template` file and rename it to `.env`: ```bash cp .env.template .env @@ -135,10 +135,10 @@ Before you start, make sure you have the following: - **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](https://console.cloud.google.com/google/maps-apis/credentials)) -6. **Install Python Dependencies: 📚** +6. **Install Python Dependencies:** You have two options for installing the required Python packages: - **Option A: Using a Virtual Environment (Recommended) 🐍** + **Option A: Using a Virtual Environment (Recommended)** - It's recommended to use a virtual environment to isolate your project dependencies and avoid conflicts - Create a new virtual environment in the backend directory: ```bash @@ -165,9 +165,9 @@ Before you start, make sure you have the following: ``` - Note that this approach may lead to conflicts with other Python projects on your system -## III. Running the Backend Locally 🏃‍♂️ +## III. Running the Backend Locally -1. **Set up Ngrok for Tunneling: 🚇** +1. **Set up Ngrok for Tunneling:** - Sign up for a free account on [https://ngrok.com/](https://ngrok.com/) and install Ngrok - 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: @@ -176,7 +176,7 @@ Before you start, make sure you have the following: ``` - 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: 🖥️** +2. **Start the Backend Server:** - In your terminal, run: ```bash uvicorn main:app --reload --env-file .env @@ -186,7 +186,7 @@ Before you start, make sure you have the following: - `--host 0.0.0.0` listens to every interface on your computer so you don't have to set up `ngrok` when developing in your network - `--port 8000` port for backend to listen -3. **Troubleshooting SSL Errors: 🔒** +3. **Troubleshooting SSL Errors:** - **SSL Errors:** If you encounter SSL certificate errors during model downloads, add this to `utils/stt/vad.py`: ```python import ssl @@ -204,7 +204,7 @@ Before you start, make sure you have the following: Now, your Omi app should be successfully connected to the locally running backend. -5. **When You're Done: 🛑** +5. **When You're Done:** - If you used a virtual environment, when you're finished working with the backend, deactivate it by running: ```bash deactivate @@ -212,7 +212,7 @@ Now, your Omi app should be successfully connected to the locally running backen - This command returns you to your system's global Python environment - To reactivate the virtual environment later, just run the activation command again (`source venv/bin/activate` on macOS/Linux or `venv\Scripts\activate` on Windows) -## Environment Variables 🔐 +## Environment Variables: Here's a detailed explanation of each environment variable you need to define in your `.env` file: @@ -240,17 +240,17 @@ Here's a detailed explanation of each environment variable you need to define in Make sure to replace the placeholders (``, ``, etc.) with your actual values. -## Contributing 🤝 +## Contributing We welcome contributions from the open source community! Whether it's improving documentation, adding new features, or reporting bugs, your input is valuable. Check out our [Contribution Guide](https://docs.omi.me/developer/Contribution/) for more information. -## Support 🆘 +## Support 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/omi) for discussions and questions -- **Documentation: 📚** Check out our [full documentation](https://docs.omi.me/) for in-depth guides +- **GitHub Issues:** For bug reports and feature requests +- **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. +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/backend/memory_embeddings.mdx b/docs/docs/developer/backend/memory-embeddings.mdx similarity index 95% rename from docs/docs/developer/backend/memory_embeddings.mdx rename to docs/docs/developer/backend/memory-embeddings.mdx index 597090fea6..4a6b30e727 100644 --- a/docs/docs/developer/backend/memory_embeddings.mdx +++ b/docs/docs/developer/backend/memory-embeddings.mdx @@ -3,7 +3,7 @@ title: "Memory Embeddings" description: "This document outlines how Omi creates and stores embeddings for memories." --- -## 🔄 Process Overview +## Process Overview 1. Memory processing triggers embedding creation 2. Structured data is extracted from the memory @@ -14,7 +14,7 @@ description: "This document outlines how Omi creates and stores embeddings for m ![Embeddings](/images/docs/developer/images/embeddings.png) -## 📊 Detailed Steps +## Detailed Steps ### 1. Memory Processing Triggers Embedding Creation @@ -63,18 +63,18 @@ description: "This document outlines how Omi creates and stores embeddings for m - Sends data point to Pinecone API using upsert operation - Pinecone stores embedding and metadata in specified index -## 🎯 Why This Matters +## Why This Matters 1. **Semantic Search**: Enables Omi to find semantically similar memories when answering user questions 2. **Metadata for Filtering**: Allows efficient filtering of memories by user or time range during retrieval -## 🔍 Additional Considerations +## Additional Considerations - **Embedding Model**: Uses OpenAI's `text-embedding-3-large` model - **Index Configuration**: Ensure Pinecone index is configured for the chosen embedding model - **Retrieval**: `query_vectors` function in `database/vector_db.py` retrieves memory IDs based on query embedding and filter criteria -## 💻 Key Code Components +## Key Code Components ```python # In utils/memories/process_memory.py diff --git a/docs/docs/developer/backend/postprocessing.mdx b/docs/docs/developer/backend/postprocessing.mdx index 39580775c0..8780305d98 100644 --- a/docs/docs/developer/backend/postprocessing.mdx +++ b/docs/docs/developer/backend/postprocessing.mdx @@ -4,7 +4,7 @@ description: "This document outlines the post-processing workflow for memories i --- -## 📊 Process Overview +## Process Overview 1. Post-processing request initiated 2. Request handled by `routers/postprocessing.py` @@ -17,7 +17,7 @@ description: "This document outlines the post-processing workflow for memories i ![Post Processing](/images/docs/developer/images/postprocessing.png) -## 🔍 Detailed Steps +## Detailed Steps ### 1. Post-Processing Request @@ -81,7 +81,7 @@ If requested: - Uses Hume API to analyze user's emotions in the recording - Can trigger notifications based on detected emotions -## 💻 Key Code Components +## Key Code Components ```python # In routers/postprocessing.py diff --git a/docs/docs/developer/backend/StoringMemory.mdx b/docs/docs/developer/backend/storing-memory.mdx similarity index 90% rename from docs/docs/developer/backend/StoringMemory.mdx rename to docs/docs/developer/backend/storing-memory.mdx index b5e1364ea3..5e269f2314 100644 --- a/docs/docs/developer/backend/StoringMemory.mdx +++ b/docs/docs/developer/backend/storing-memory.mdx @@ -3,7 +3,7 @@ title: Storing Memories description: 'This document outlines the process of storing memory objects in the Omi AI system.' --- -## 🔄 Overview of the Process +## Overview of the Process 1. Memory object is processed 2. Object is converted to a dictionary @@ -14,19 +14,19 @@ description: 'This document outlines the process of storing memory objects in th -## 🧠 Detailed Steps +## Detailed Steps -### 1. 📥 Memory Object Received +### 1. Memory Object Received - The `process_memory` function in `utils/memories/process_memory.py` processes a new or updated memory - The complete Memory object is then sent to the `upsert_memory` function in `database/memories.py` -### 2. 🔄 Convert to Dictionary +### 2. Convert to Dictionary - The `upsert_memory` function converts the Memory object into a Python dictionary - This conversion is necessary because Firestore stores data in a JSON-like format -### 3. 📊 Data Fields +### 3. Data Fields The dictionary contains the following key fields: @@ -48,7 +48,7 @@ The dictionary contains the following key fields: | `deleted` | Boolean indicating if the memory has been deleted | | `visibility` | Visibility setting of the memory | -#### 📋 Structured Information +#### Structured Information The `structured` field contains: @@ -59,7 +59,7 @@ The `structured` field contains: - `action_items`: List of derived action items - `events`: List of extracted calendar events -#### 🗣️ Transcript Segments +#### Transcript Segments Each segment in `transcript_segments` includes: @@ -70,7 +70,7 @@ Each segment in `transcript_segments` includes: - `is_user`: Boolean indicating if spoken by the user - `person_id`: ID of a person from user's profiles (if applicable) -#### 🔄 Postprocessing Information +#### Postprocessing Information The `postprocessing` field contains: @@ -78,12 +78,12 @@ The `postprocessing` field contains: - `model`: Post-processing model used (e.g., "fal_whisperx") - `fail_reason`: (Optional) Reason for failure -### 4. 💾 Save to Firestore +### 4. Save to Firestore - `database/memories.py` uses the Firebase Firestore API to store the memory data dictionary - Data is saved in the `memories` collection within the user's document -#### 📁 Firestore Structure +#### Firestore Structure Users Collection ```└── User Document └── memories Collection diff --git a/docs/docs/developer/backend/transcription.mdx b/docs/docs/developer/backend/transcription.mdx index b58b6fe286..d85a5f3d25 100644 --- a/docs/docs/developer/backend/transcription.mdx +++ b/docs/docs/developer/backend/transcription.mdx @@ -5,13 +5,13 @@ description: 'This document outlines the real-time audio transcription process i ![Post Processing](/images/docs/developer/images/transcription-process.png) -## 📡 Audio Streaming +## Audio Streaming 1. The Omi App initiates a real-time audio stream to the backend. 2. Audio data is sent via WebSocket to the `/listen` endpoint. 3. Audio can be in Opus or Linear16 encoding, depending on device settings. -## 🔌 WebSocket Handling +## WebSocket Handling ### `/listen` Endpoint @@ -29,7 +29,7 @@ description: 'This document outlines the real-time audio transcription process i - `receive_audio`: Receives audio chunks and sends to Deepgram - `send_heartbeat`: Sends periodic messages to keep connection alive -## 🔊 Deepgram Integration +## Deepgram Integration ### `process_audio_dg` Function @@ -57,7 +57,7 @@ description: 'This document outlines the real-time audio transcription process i | `multichannel` | channels > 1 | Enable if multiple channels | | `model` | 'nova-2-general' | Deepgram model selection | -## 🔄 Transcript Processing +## Transcript Processing 1. Deepgram processes audio and triggers `on_message` callback 2. `on_message` receives raw transcript data @@ -77,7 +77,7 @@ description: 'This document outlines the real-time audio transcription process i | `is_user` | Boolean indicating if segment is from the user | | `person_id` | ID of matched person from user profiles (if applicable) | -## 🔑 Key Considerations +## Key Considerations - Real-time, low-latency transcription - Speaker diarization accuracy may vary diff --git a/docs/docs/developer/DevKit2Testing.mdx b/docs/docs/developer/devkit2-testing.mdx similarity index 96% rename from docs/docs/developer/DevKit2Testing.mdx rename to docs/docs/developer/devkit2-testing.mdx index 3695baf48c..6280e75657 100644 --- a/docs/docs/developer/DevKit2Testing.mdx +++ b/docs/docs/developer/devkit2-testing.mdx @@ -5,7 +5,7 @@ description: How to test the Omi Dev Kit 2 **SEE THE BOTTOM OF THE DOCUMENT LABELED BUGS IF YOU RUN INTO ISSUES** -## 🎯Two Key Tests +## Two Key Tests There are two important characteristics to test: @@ -52,9 +52,9 @@ You may get the following return command bytes if you send a packet | 4 | File size is 0 | | 6 | Invalid command. The command sent is not one of the commands listed above | -⚠️ Note: If you don't receive 100 or 200, the file request wasn't carried out. +Note: If you don't receive 100 or 200, the file request wasn't carried out. -## **🧪 Testing Process** +## **Testing Process** There are 5 python files for testing. Please run them in the order shown here. This process is meant to test individual devices, since multiple could be on at any time. Before testing, please ensure you have all the python packages needed for running(in requirements.txt) . Also ensure that you have ffmpeg and opus for decoding. @@ -63,7 +63,7 @@ There are 5 python files for testing. Please run them in the order shown here. T * ✅ Python packages (see requirements.txt) * ✅ ffmpeg and opus for decoding -**⚠️ WARNING: NEVER remove the SD card while the device is on\! It's not hot-swappable.** +**WARNING: NEVER remove the SD card while the device is on\! It's not hot-swappable.** #### Safe SD Card Removal @@ -139,7 +139,7 @@ Config file should include: Names-names customizable to be set by the user User id-user id after bonding -## 🐞 Known Bugs +## Known Bugs Bug 1 (Version 2.0.1) Some users are experiencing issues with the sd card streaming. One cause is the fact that sometimes the audio file is empty, and since the a01.txt file, which audio data is streamed into, does not exist, nothing is actually written. diff --git a/docs/docs/developer/firmware/Compile_firmware.mdx b/docs/docs/developer/firmware/Compile_firmware.mdx deleted file mode 100644 index 1e8919ae82..0000000000 --- a/docs/docs/developer/firmware/Compile_firmware.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "Compiling the Device Firmware" -description: "Step-by-step guide to compile and install firmware for your OMI device." ---- - -### Prefer a Pre-Built Firmware? - -Navigate to [Flash Device](https://docs.omi.me/docs/get_started/Flash_device) to install a pre-built firmware version. - ---- - -## Build Your Own Firmware - -### Step 1: Set Up nRF Connect - -Follow the tutorial in this video: -[How to Set Up nRF Connect](https://youtu.be/EAJdOqsL9m8) - -### Step 2: Choose Your Firmware Version - -You have two options for building firmware: - -1. **OMI Consumer Version** - - Open the `firmware/omi` folder - - Use **nRF Connect** SDK and toolchain version `2.9.0` - -2. **OMI DevKit Version** - - Open the `firmware/devkit` folder - - Use **nRF Connect** SDK and toolchain version `2.7.0` - -Make sure to use the correct SDK version for the firmware you're building. - ---- - -### Step 3: Open the Firmware Application - -1. Open **nRF Connect Extension** inside VS Code. -2. Click "Open an existing application" and navigate to either the `firmware/omi` or `firmware/devkit` folder in the root of this repository, depending on which version you want to build. - - install_firmware_screenshot_1 - - install_firmware_screenshot_2 - ---- - -### Step 3: Add a Build Configuration - -1. In the application panel of the extension, click the **Add Build Configuration** icon. Choose a `CMake Preset` that matches your hardware. - - Build Configuration - -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 - ---- - -### Step 4: Locate the Compiled Firmware - -Once the build succeeds, you will find the `zephyr.uf2` file in the directory corresponding to the CMake preset you chose, for example `firmware/build/build_xiao_ble_sense_devkitv2-adafruit/zephyr/`. - ---- - -### Step 5: Flash the Firmware - -Follow the steps as described [here](../get_started/Flash_device) using the generated file - ---- - -## Congratulations! - -You have successfully compiled and installed the firmware on your OMI device. diff --git a/docs/docs/developer/firmware/compile-firmware.mdx b/docs/docs/developer/firmware/compile-firmware.mdx new file mode 100644 index 0000000000..a8ff419fa2 --- /dev/null +++ b/docs/docs/developer/firmware/compile-firmware.mdx @@ -0,0 +1,84 @@ +--- +title: "Compiling the Device Firmware" +description: "Step-by-step guide to compile and install firmware for your OMI device." +--- + +### Prefer a Pre-Built Firmware? + +Navigate to [Flash Device](https://docs.omi.me/docs/get_started/Flash_device) to install a pre-built firmware version. + +--- + +## Build Your Own Firmware + + + + Follow the tutorial in this video: + [How to Set Up nRF Connect](https://youtu.be/EAJdOqsL9m8) + + + + You have two options for building firmware: + + 1. **OMI Consumer Version** + - Open the `firmware/omi` folder + - Use **nRF Connect** SDK and toolchain version `2.9.0` + + 2. **OMI DevKit Version** + - Open the `firmware/devkit` folder + - Use **nRF Connect** SDK and toolchain version `2.7.0` + + Make sure to use the correct SDK version for the firmware you're building. + + + + 1. Open **nRF Connect Extension** inside VS Code. + 2. Click "Open an existing application" and navigate to either the `firmware/omi` or `firmware/devkit` folder in the root of this repository, depending on which version you want to build. + + install_firmware_screenshot_1 + + install_firmware_screenshot_2 + + + + 1. In the application panel of the extension, click the **Add Build Configuration** icon. Choose a `CMake Preset` that matches your hardware. + + Build Configuration + + Board target should 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 + + + + Once the build succeeds, you will find the `zephyr.uf2` file in the directory corresponding to the CMake preset you chose, for example `firmware/build/build_xiao_ble_sense_devkitv2-adafruit/zephyr/`. + + + + Follow the steps as described [here](../get_started/Flash_device) using the generated file. + + + +## Congratulations! + +You have successfully compiled and installed the firmware on your OMI device. diff --git a/docs/docs/developer/saving-audio.mdx b/docs/docs/developer/saving-audio.mdx new file mode 100644 index 0000000000..dddf4cb6c0 --- /dev/null +++ b/docs/docs/developer/saving-audio.mdx @@ -0,0 +1,133 @@ +--- +title: Storing Audio +description: '' +--- + +# Creating a Google Cloud Storage Bucket for Audio Files + +This guide will walk you through setting up a Google Cloud Storage (GCS) bucket perfect for keeping your 🎶 audio files �� safe and sound. We'll set it up with the right permissions and give you the keys 🔑 (credentials) so you can easily upload and manage your tunes. + +## Prerequisites + +* An active Google Cloud Platform (GCP) account. +* A little bit of experience navigating the GCP console. + + + + 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! + 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: `omi-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. + - **Pick a storage class:** **Standard** is usually the best choice for files you access often. If you have audio you don't need very often, check out the other options (Nearline, Coldline, Archive) to save some 💰. + - **Control who can access your files:** + - **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! + - **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. + - **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. + + + + Think of this like a special ID card for your app to access the bucket. + + 1. **Go to "IAM & Admin":** + - Find it in the GCP console menu. + 2. **Click "Service Accounts":** + - This is where we'll make that ID card. + 3. **"CREATE SERVICE ACCOUNT":** + - Click the button to get started. + 4. **Fill in the Details:** + - **Service account name:** Give it a clear name. Example: `test-service-account-omi-app`. + - **Service account description:** What will this account do? (e.g., "Uploads audio to the omi-audio-files bucket"). + 5. **Give Permissions (Optional):** + - **Select a role:** Search for and select **"Storage Object User"**. This gives your app permission to work with the audio files in your bucket. + 6. **Grant Users Access (Optional):** + - We can skip this for now – we'll use a key instead. + 7. **Create that Account!** + - Review and click **"DONE"**. + + + + 1. **Find Your Service Account:** + - Go back to the service accounts list and click on the one you just created. + 2. **Click "KEYS":** + - Time to get that access key! + 3. **Add a New Key:** + - Click **"ADD KEY"** and then **"Create new key"**. + 4. **Choose "JSON":** + - This is the format we need. + 5. **Create!** + - Click **"CREATE"**, and the key file will download to your computer. + - **Keep it Safe!** This key gives your app access to your bucket – don't share it publicly! + + + + This step turns your key file into a special code we can use in the app. + + **Option 1: Command Line** + 1. **Open Your Terminal:** + - Open a terminal or command prompt. + 2. **Go to Your Key:** + - Use `cd` to navigate to where you saved the key file. + 3. **Run This Command:** + - Replace `your-key-file.json` with the actual name of your key file: + ```bash + 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. + + **Option 2: Website Converter** + 1. **Go to the Converter:** + - Visit [https://codebeautify.org/json-to-base64-converter](https://codebeautify.org/json-to-base64-converter). + 2. **Paste Your Key:** + - Open your `json` key file and copy the entire contents. + 3. **Convert!** + - Paste the key contents into the website's input box and click **"JSON to Base64"**. + 4. **Copy the Base64:** + - Copy the encoded text from the output box. + + + + 1. **Back to the GCS Console:** + - Go back to the [Google Cloud Storage console](https://console.cloud.google.com/storage/browser). + 2. **Find Your Bucket:** + - You'll see it in the list. + 3. **Copy the Name:** + - Click on your bucket's name and copy it from the **"Bucket details"** page. + + + +## You're All Set! + +You now have two important pieces: + +* **GCP Credentials Base64:** Your special encoded key. +* **GCP Bucket Name:** The name of your audio bucket. + +## Using Your Storage with Audio Streaming + +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 + +We welcome contributions from the open source community! Whether it's improving documentation, adding new features, or reporting bugs, your input is valuable. Check out our [Contribution Guide](https://docs.omi.me/developer/Contribution/) for more information. + +## Support + +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/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. \ No newline at end of file diff --git a/docs/docs/developer/savingaudio.mdx b/docs/docs/developer/savingaudio.mdx deleted file mode 100644 index 1c0693172b..0000000000 --- a/docs/docs/developer/savingaudio.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: Storing Audio -description: '' ---- - -# 🎧 Creating a Google Cloud Storage Bucket for Audio Files 🎧 - -This guide will walk you through setting up a Google Cloud Storage (GCS) bucket perfect for keeping your 🎶 audio files 🎶 safe and sound. We'll set it up with the right permissions and give you the keys 🔑 (credentials) so you can easily upload and manage your tunes. - -## 🚀 Prerequisites 🚀 - -* An active Google Cloud Platform (GCP) account. -* A little bit of experience navigating the GCP console. - -## 🪣 Step 1: Create Your Audio 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! -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: `omi-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. - - **Pick a storage class:** **Standard** is usually the best choice for files you access often. If you have audio you don't need very often, check out the other options (Nearline, Coldline, Archive) to save some 💰. - - **Control who can access your files:** - - **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! - - **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. - - **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 🔐 - -Think of this like a special ID card for your app to access the bucket. - -1. **Go to "IAM & Admin":** - - Find it in the GCP console menu. -2. **Click "Service Accounts":** - - This is where we'll make that ID card. -3. **"CREATE SERVICE ACCOUNT":** - - Click the button to get started. -4. **Fill in the Details:** - - **Service account name:** Give it a clear name. Example: `test-service-account-omi-app`. - - **Service account description:** What will this account do? (e.g., "Uploads audio to the omi-audio-files bucket"). -5. **Give Permissions (Optional):** - - **Select a role:** Search for and select **"Storage Object User"**. This gives your app permission to work with the audio files in your bucket. -6. **Grant Users Access (Optional):** - - We can skip this for now – we'll use a key instead. -7. **Create that Account!** - - Review and click **"DONE"**. - -## 🔑 Step 3: Get Your Key 🔑 - -1. **Find Your Service Account:** - - Go back to the service accounts list and click on the one you just created. -2. **Click "KEYS":** - - Time to get that access key! -3. **Add a New Key:** - - Click **"ADD KEY"** and then **"Create new key"**. -4. **Choose "JSON":** - - This is the format we need. -5. **Create!** - - Click **"CREATE"**, and the key file will download to your computer. - - **Keep it Safe!** This key gives your app access to your bucket – don't share it publicly! - -## 🧬 Step 4: Convert to Base64 🧬 - -This step turns your key file into a special code we can use in the app. - -**Option 1: Command Line** - -1. **Open Your Terminal:** - - Open a terminal or command prompt. -2. **Go to Your Key:** - - Use `cd` to navigate to where you saved the key file. -3. **Run This Command:** - - Replace `your-key-file.json` with the actual name of your key file: - ```bash - 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. - -**Option 2: Website Converter** - -1. **Go to the Converter:** - - Visit [https://codebeautify.org/json-to-base64-converter](https://codebeautify.org/json-to-base64-converter). -2. **Paste Your Key:** - - Open your `json` key file and copy the entire contents. -3. **Convert!** - - Paste the key contents into the website's input box and click **"JSON to Base64"**. -4. **Copy the Base64:** - - Copy the encoded text from the output box. - -## 📝 Step 5: Grab Your Bucket Name 📝 - -1. **Back to the GCS Console:** - - Go back to the [Google Cloud Storage console](https://console.cloud.google.com/storage/browser). -2. **Find Your Bucket:** - - You'll see it in the list. -3. **Copy the Name:** - - Click on your bucket's name and copy it from the **"Bucket details"** page. - -## 🎉 You're All Set! 🎉 - -You now have two important pieces: - -* **GCP Credentials Base64:** Your special encoded key. -* **GCP Bucket Name:** The name of your audio bucket. - -## Using Your Storage with Audio Streaming - -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 🤝 - -We welcome contributions from the open source community! Whether it's improving documentation, adding new features, or reporting bugs, your input is valuable. Check out our [Contribution Guide](https://docs.omi.me/developer/Contribution/) for more information. - -## Support 🆘 - -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/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/sdk/ReactNative.mdx b/docs/docs/developer/sdk/react-native.mdx similarity index 100% rename from docs/docs/developer/sdk/ReactNative.mdx rename to docs/docs/developer/sdk/react-native.mdx diff --git a/docs/docs/get_started/Flash_device.mdx b/docs/docs/get-started/flash-device.mdx similarity index 100% rename from docs/docs/get_started/Flash_device.mdx rename to docs/docs/get-started/flash-device.mdx diff --git a/docs/docs/get_started/introduction.mdx b/docs/docs/get-started/introduction.mdx similarity index 98% rename from docs/docs/get_started/introduction.mdx rename to docs/docs/get-started/introduction.mdx index 031f65a7e4..c8e4e0ef70 100644 --- a/docs/docs/get_started/introduction.mdx +++ b/docs/docs/get-started/introduction.mdx @@ -51,7 +51,7 @@ Simply connect Omi to your mobile device and enjoy: -## 🌟 Key Features +## Key Features - 🚀 **Fully Open-Source** - 🔋 **4 days Battery Life** @@ -63,7 +63,7 @@ Simply connect Omi to your mobile device and enjoy: --- -## 📲 Get the App +## Get the App
diff --git a/docs/docs/getstarted.mdx b/docs/docs/getstarted.mdx index 9f90e123c4..57c6651654 100644 --- a/docs/docs/getstarted.mdx +++ b/docs/docs/getstarted.mdx @@ -40,8 +40,6 @@ Features style={{ width:"20%" }} /> -\ -\ FAQ: diff --git a/docs/docs/hardware/DevKit1.mdx b/docs/docs/hardware/DevKit1.mdx index 08469d2d75..769dddb4b7 100644 --- a/docs/docs/hardware/DevKit1.mdx +++ b/docs/docs/hardware/DevKit1.mdx @@ -3,16 +3,16 @@ title: "Omi DevKit 1" description: "DevKit 1 is a necklace form factor device that can be worn around the neck. It runs on Xiao nRF52840, is powered by a rechargeable battery, and connects to your phone to stream the audio data. The device is designed to be used with the Omi app, which is available on the Apple App Store and Google Play Store." --- -## How to get it[​](#how-to-get-it "Direct link to How to get it") +## How to get it -### Assembled Device[​](#assembled-device "Direct link to Assembled Device") +### Assembled Device If you didn't get the original [Omi DevKit](https://www.omi.me/products/omi-dev-kit-2) from the Kickstarter campaign, you can purchase it from the Based Hardware website. -### Parts[​](#parts "Direct link to Parts") +### Parts[ If you prefer to assemble the device yourself, here is the [guide](https://docs.omi.me/docs/assembly/Build_the_device) -### Firmware[​](#firmware "Direct link to Firmware") +### Firmware You can get the latest firmware from [Omi Github repo](https://github.com/BasedHardware/Omi/releases/) diff --git a/docs/docs/hardware/DevKit2.mdx b/docs/docs/hardware/DevKit2.mdx index dac2556a6a..982b20c762 100644 --- a/docs/docs/hardware/DevKit2.mdx +++ b/docs/docs/hardware/DevKit2.mdx @@ -5,12 +5,12 @@ description: "DevKit 2 builds on top of and expands the DevKit1 capabilities, wh You can see the new device [announcement on X](https://twitter.com/kodjima33/status/1821324066651041837). -## How to get it[​](#how-to-get-it "Direct link to How to get it") +## How to get it -### Assembled Device[​](#assembled-device "Direct link to Assembled Device") +### Assembled Device You can order assembled [Omi DevKit 2](https://omi.me/products/omi-dev-kit-2) from the Based Hardware website. -### Firmware[​](#firmware "Direct link to Firmware") +### Firmware You can get the latest firmware from [Omi Github repo](https://github.com/BasedHardware/Omi/releases/) diff --git a/docs/docs/hardware/omiGlass.mdx b/docs/docs/hardware/omi-glass.mdx similarity index 100% rename from docs/docs/hardware/omiGlass.mdx rename to docs/docs/hardware/omi-glass.mdx diff --git a/docs/docs/test.mdx b/docs/docs/test.mdx deleted file mode 100644 index 80d8b1d5fb..0000000000 --- a/docs/docs/test.mdx +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'New file' -description: 'Description of your new file.' ---- - diff --git a/docs/getstartedwithomi.mdx b/docs/get-started-with-omi.mdx similarity index 100% rename from docs/getstartedwithomi.mdx rename to docs/get-started-with-omi.mdx diff --git a/docs/images/IMG_1D88FF7716F5-1.jpeg b/docs/images/IMG_1D88FF7716F5-1.jpeg index 20c9318135..a48a259cfa 100644 Binary files a/docs/images/IMG_1D88FF7716F5-1.jpeg and b/docs/images/IMG_1D88FF7716F5-1.jpeg differ diff --git a/docs/images/IMG_5303.png b/docs/images/IMG_5303.png index 6ff1587b23..7c916e68e3 100644 Binary files a/docs/images/IMG_5303.png and b/docs/images/IMG_5303.png differ diff --git a/docs/images/IMG_5DCB13BE239B-1.jpeg b/docs/images/IMG_5DCB13BE239B-1.jpeg index 0073d9d0af..d7f03ef88f 100644 Binary files a/docs/images/IMG_5DCB13BE239B-1.jpeg and b/docs/images/IMG_5DCB13BE239B-1.jpeg differ diff --git a/docs/images/checks-passed.png b/docs/images/checks-passed.png index 3303c77364..84a0b4affd 100644 Binary files a/docs/images/checks-passed.png and b/docs/images/checks-passed.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/1.png b/docs/images/docs/assembly/images/latest_assembly/1.png index 57095ca024..8479008bcf 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/1.png and b/docs/images/docs/assembly/images/latest_assembly/1.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/10.png b/docs/images/docs/assembly/images/latest_assembly/10.png index 8afcc790d6..115544302f 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/10.png and b/docs/images/docs/assembly/images/latest_assembly/10.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/2.png b/docs/images/docs/assembly/images/latest_assembly/2.png index f113fd442d..656bfe0fce 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/2.png and b/docs/images/docs/assembly/images/latest_assembly/2.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/3.png b/docs/images/docs/assembly/images/latest_assembly/3.png index 9645c25a4b..612c646745 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/3.png and b/docs/images/docs/assembly/images/latest_assembly/3.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/4.png b/docs/images/docs/assembly/images/latest_assembly/4.png index e1370a76c9..7cc7c009cc 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/4.png and b/docs/images/docs/assembly/images/latest_assembly/4.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/5.png b/docs/images/docs/assembly/images/latest_assembly/5.png index 55497a78d7..b05d6c3ef3 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/5.png and b/docs/images/docs/assembly/images/latest_assembly/5.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/6.png b/docs/images/docs/assembly/images/latest_assembly/6.png index 0b69f08ccd..5314e894f2 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/6.png and b/docs/images/docs/assembly/images/latest_assembly/6.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/7.png b/docs/images/docs/assembly/images/latest_assembly/7.png index 0c0f0e5a1a..6c8d0d7976 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/7.png and b/docs/images/docs/assembly/images/latest_assembly/7.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/8.png b/docs/images/docs/assembly/images/latest_assembly/8.png index 6acbe1725d..2be75cbafa 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/8.png and b/docs/images/docs/assembly/images/latest_assembly/8.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/9.png b/docs/images/docs/assembly/images/latest_assembly/9.png index 821aecea58..bbfc9dee6f 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/9.png and b/docs/images/docs/assembly/images/latest_assembly/9.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/case.png b/docs/images/docs/assembly/images/latest_assembly/case.png index 8c51c20235..d77b18b118 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/case.png and b/docs/images/docs/assembly/images/latest_assembly/case.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/components.png b/docs/images/docs/assembly/images/latest_assembly/components.png index b1241b643b..31b59ebad1 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/components.png and b/docs/images/docs/assembly/images/latest_assembly/components.png differ diff --git a/docs/images/docs/assembly/images/latest_assembly/electronics.png b/docs/images/docs/assembly/images/latest_assembly/electronics.png index 975fe5fccc..a516bacc53 100644 Binary files a/docs/images/docs/assembly/images/latest_assembly/electronics.png and b/docs/images/docs/assembly/images/latest_assembly/electronics.png differ diff --git a/docs/images/docs/developer/images/backend.png b/docs/images/docs/developer/images/backend.png index 78a72cd949..fb43c4c85c 100644 Binary files a/docs/images/docs/developer/images/backend.png and b/docs/images/docs/developer/images/backend.png differ diff --git a/docs/images/docs/developer/images/build_configuration.png b/docs/images/docs/developer/images/build_configuration.png index beb1f58046..9efb5bf8de 100644 Binary files a/docs/images/docs/developer/images/build_configuration.png and b/docs/images/docs/developer/images/build_configuration.png differ diff --git a/docs/images/docs/developer/images/build_configuration_button.png b/docs/images/docs/developer/images/build_configuration_button.png index 6812e3ee6c..3fa8f6174d 100644 Binary files a/docs/images/docs/developer/images/build_configuration_button.png and b/docs/images/docs/developer/images/build_configuration_button.png differ diff --git a/docs/images/docs/developer/images/dkv2_1.jpg b/docs/images/docs/developer/images/dkv2_1.jpg index 3f407c3412..ce762595d2 100644 Binary files a/docs/images/docs/developer/images/dkv2_1.jpg and b/docs/images/docs/developer/images/dkv2_1.jpg differ diff --git a/docs/images/docs/developer/images/dkv2_2.jpg b/docs/images/docs/developer/images/dkv2_2.jpg index 8ce725f067..5d67f5a458 100644 Binary files a/docs/images/docs/developer/images/dkv2_2.jpg and b/docs/images/docs/developer/images/dkv2_2.jpg differ diff --git a/docs/images/docs/developer/images/dkv2_3.jpg b/docs/images/docs/developer/images/dkv2_3.jpg index b3700376eb..b87147384f 100644 Binary files a/docs/images/docs/developer/images/dkv2_3.jpg and b/docs/images/docs/developer/images/dkv2_3.jpg differ diff --git a/docs/images/docs/developer/images/dkv2_4.jpg b/docs/images/docs/developer/images/dkv2_4.jpg index fe8a53e847..6394c86772 100644 Binary files a/docs/images/docs/developer/images/dkv2_4.jpg and b/docs/images/docs/developer/images/dkv2_4.jpg differ diff --git a/docs/images/docs/developer/images/embeddings.png b/docs/images/docs/developer/images/embeddings.png index 8ae7d2bf1a..12368e40d7 100644 Binary files a/docs/images/docs/developer/images/embeddings.png and b/docs/images/docs/developer/images/embeddings.png differ diff --git a/docs/images/docs/developer/images/install_firmware_screenshot_1.png b/docs/images/docs/developer/images/install_firmware_screenshot_1.png index 5d09cb889e..f5f3040f51 100644 Binary files a/docs/images/docs/developer/images/install_firmware_screenshot_1.png and b/docs/images/docs/developer/images/install_firmware_screenshot_1.png differ diff --git a/docs/images/docs/developer/images/install_firmware_screenshot_2.png b/docs/images/docs/developer/images/install_firmware_screenshot_2.png index 9dfdd4d57c..1cf956a5a8 100644 Binary files a/docs/images/docs/developer/images/install_firmware_screenshot_2.png and b/docs/images/docs/developer/images/install_firmware_screenshot_2.png differ diff --git a/docs/images/docs/developer/images/memorystore.png b/docs/images/docs/developer/images/memorystore.png index c85f761bfc..69e309e91b 100644 Binary files a/docs/images/docs/developer/images/memorystore.png and b/docs/images/docs/developer/images/memorystore.png differ diff --git a/docs/images/docs/developer/images/postprocessing.png b/docs/images/docs/developer/images/postprocessing.png index bc0565e08c..6c3faeb3dc 100644 Binary files a/docs/images/docs/developer/images/postprocessing.png and b/docs/images/docs/developer/images/postprocessing.png differ diff --git a/docs/images/docs/developer/images/transcription-process.png b/docs/images/docs/developer/images/transcription-process.png index 13e148eb22..4268bec197 100644 Binary files a/docs/images/docs/developer/images/transcription-process.png and b/docs/images/docs/developer/images/transcription-process.png differ diff --git a/docs/images/docs/get_started/assets/images/dfu_dev_kit_reset_button-6564f71a7c6f4aab49c9ff131d3435ce.png b/docs/images/docs/get_started/assets/images/dfu_dev_kit_reset_button-6564f71a7c6f4aab49c9ff131d3435ce.png index 8c06e7b97d..c6408c282a 100644 Binary files a/docs/images/docs/get_started/assets/images/dfu_dev_kit_reset_button-6564f71a7c6f4aab49c9ff131d3435ce.png and b/docs/images/docs/get_started/assets/images/dfu_dev_kit_reset_button-6564f71a7c6f4aab49c9ff131d3435ce.png differ diff --git a/docs/images/docs/get_started/assets/images/dk2_rst_button-568e837198e6acedc078bd922c2a46e0.jpeg b/docs/images/docs/get_started/assets/images/dk2_rst_button-568e837198e6acedc078bd922c2a46e0.jpeg index 5ff83b3c81..a1666c3e77 100644 Binary files a/docs/images/docs/get_started/assets/images/dk2_rst_button-568e837198e6acedc078bd922c2a46e0.jpeg and b/docs/images/docs/get_started/assets/images/dk2_rst_button-568e837198e6acedc078bd922c2a46e0.jpeg differ diff --git a/docs/images/docs/get_started/images/omibanner.png b/docs/images/docs/get_started/images/omibanner.png index 2b1d8cf82f..33f60450c8 100644 Binary files a/docs/images/docs/get_started/images/omibanner.png and b/docs/images/docs/get_started/images/omibanner.png differ diff --git a/docs/images/docs/hardware/images/image.png b/docs/images/docs/hardware/images/image.png index 41d86c0efa..6adcb18fde 100644 Binary files a/docs/images/docs/hardware/images/image.png and b/docs/images/docs/hardware/images/image.png differ diff --git a/docs/images/docs/info/images/disclaimer.png b/docs/images/docs/info/images/disclaimer.png index 42720dde59..820a3bc2ee 100644 Binary files a/docs/images/docs/info/images/disclaimer.png and b/docs/images/docs/info/images/disclaimer.png differ diff --git a/docs/images/hero-dark.png b/docs/images/hero-dark.png index a61cbb1252..769b81a38a 100644 Binary files a/docs/images/hero-dark.png and b/docs/images/hero-dark.png differ diff --git a/docs/images/hero-light.png b/docs/images/hero-light.png index 68c712d6db..17decec003 100644 Binary files a/docs/images/hero-light.png and b/docs/images/hero-light.png differ diff --git a/docs/images/promo_banner_2.png b/docs/images/promo_banner_2.png index b07915c06d..522e55d099 100644 Binary files a/docs/images/promo_banner_2.png and b/docs/images/promo_banner_2.png differ