Launch Readme, April 2024: Friend Documentation
Table of contents
- TOC
Friend: Open-Source AI Wearable with 24h+ on single charge
Friend is an AI wearable device that records everything you say, gives you proactive feedback and advice.
Features
- Real-Time AI Audio Processing: Leverage powerful on-device AI capabilities for real-time audio analysis.
- Low-powered Bluetooth: Capture audio for 24h+ on a small button battery
- Open-Source Software: Access and contribute to the pinâs software stack, designed with openness and community collaboration in mind.
- Wearable Design: Experience unparalleled convenience with ergonomic and lightweight design, perfect for everyday wear.
How it works
Structure
There are 3 different apps in these repositories located in different branches and folders. Our goal is to merge them into one big project.
Folder âAppStandaloneâ: Standalone version of the app that doesnât require any hardware to use it.
Folder âAppWithWearableâ: Wearable-connected version of the app that requires the âFriend necklaceâ to use it.
Folder âAppWithWearableReactNativeâ: Wearable-connected version of the app that is built in React native
Hardware Buying Guide (<$20 total)
-
Board: Seeed Studio XIAO nRF52840 Sense $15 on Seedstudio and $24 on Amazon and also link for europe and India <$15/unit - Rechargeable Battery on Amazon $7
-
Slider switch $7 for 30+ units on Amazon and also link for europe but you only need one <$1/unit -
Wires. I didnât try these ones but they should work
- 3D-print design of the case is located here
Getting Started
Follow these steps to get started with your Friend.
Install the app
- Clone the repo
git clone https://github.com/BasedHardware/friend.git
- Choose which version of the app you want to install (see Structure).
- Donât have the device? run
cd apps/AppStandalone
in terminal - Have the device/NRF Board? run
cd apps/AppWithWearable
in terminal
- Donât have the device? run
- Install Flutter and CocoaPods
-
Install your environment variables
-
For AppWithWearable, open file api_calls.dart located in
apps/AppWithWearable/lib/backend/api_requests
Find âWhisperâ and instead of âkeyâ, provide your own api-key for openai whisper for transcriptions to work
then, go to apps/AppWithWearable/lib/custom_code/actions and in the âstream_api_responseâ file, add your openai key instead of â
" ![CleanShot 2024-04-11 at 00 17 32](https://github.com/BasedHardware/Omi/assets/43514161/c4d9a61d-df17-4dd5-912e-3e602fa5066c) - For AppStandalone, update variables in in .env.template file
-
- iOS: Install XCode then navigate to the iOS folder. You might need to launch Xcode to select a team and specify a bundle identifier. Android: Download/install android Studio then navigate to the Android folder Donât run in web/simulator: Bluetooth will not work
- Run
flutter clean
thenflutter pub get
thenpod install
- When everything is installed, run
flutter run
, this should run your app on a selected device
No-Code Alternative:
- Donât have the device? Clone this Flutterflow Project
- Have the wearable device? Copy this Flutterflow Project
Install Firmware
Follow these steps to install the firmware:
-
Set up nRF Connect by following the tutorial in this video: https://youtu.be/EAJdOqsL9m8
-
In the nRF Connect Extension inside your VS Code, click âOpen an existing applicationâ and open the
firmware
folder from the root of this repo. -
In the application panel of the extension, click the âAdd Build Configurationâ icon.
-
Choose the board as âxiao_ble_senseâ and select the configuration as âprj.confâ. Then, click âBuild Configurationâ.
-
Once the build succeeds, you will find the
zephyr.uf2
file in thefirmware/build/zephyr
directory. -
Double-click on the reset button of the device. The device will appear on your computer as a disk. Drag and drop the
zephyr.uf2
file into it.Note: On a Mac, you might see an error message after dropping the file, indicating that the process did not complete. This is just a Mac-specific error; the firmware is successfully uploaded.
Thatâs it! You have successfully installed the firmware on your device.
Testing Audio Recording on Your Computer
Follow these steps to test audio recording on your computer using a Python script:
-
Open your terminal and navigate to the projectâs root directory.
-
Change to the âtestâ folder:
cd test
-
Install the required Python modules:
pip install -r requirements.txt
-
Run the Python script:
python local_laptop_client.py
The recorded audio files will be stored periodically in the test/recordings
directory.
Thatâs it! You have now set up and tested audio recording on your computer.
Assemble the device
Step 0: Make sure you have bought everything from the buying guide above
Step 1: You need to design the case using 3D printer. Find .stl file here. If you donât know how to do it, send this file to someone who has a 3d printer
Step 2: Solder everything together like on the picture below. using a soldering kit. Donât have it? buy this one for $9
Step 3: Fit everything in the case. Biggest hole is for the usb port. In my example, I put the battery first, then the board and then the switch, however itâs not an ideal design. If you will figure out a better solution, please contribute!
Step 4: Use hot glue to attach the lid to the case. You can also use a scotch tape first for testing purposes. Last, on the USB-port side, youâll find 2 small round holes. This is where the thread should go through.
Congratulations! you now have a fully working and assembled device!
Contributing
Join our Discord! We welcome contributions from the community! If youâre interested in improving Friend, our current biggest goal is to combine both apps together (AppStandalone with AppWithWearable).
- Standalone App brings great prompts and rich structure
- AppWithWearable brings simple bluetooth connecting functionality
Support
For open-source support, please open an issue on GitHub and/or ask in our Discord Community. For commercial support, license inquiries, or any other questions, please contact us directly at team@whomane.com.
Disclaimer
Please note that the Friend is a prototype project and is provided âas isâ, without warranty of any kind. Use of the device should comply with all local laws and regulations concerning privacy and data protection.
Thank you for your interest in Friend, the open-source AI wearable. Weâre excited to see what youâll build with it!
Licensing
Friend is available under MIT License