Repository navigation
Device connects over BLE, but transcription doesn't start/shows "Disconnected from server #20466
|
I built the Flutter mobile app locally on Android and successfully paired my Omi wearable over Bluetooth. The device says connected, but when I talk, nothing gets transcribed. The logs show WebSocket connection to ws://... failed I am running or Connection refused the FastAPI backend locally on my laptop. How do I get live transcription working? |
Replies: 1 comment
|
Conversation with Gemini I know: [your languages/tools, e.g. Python, JavaScript, Docker] I will paste a discussion question below. Please:
Question: [paste the discussion here] I'm ready. Paste the discussion question whenever you'd like, and feel free to include: The languages/frameworks you want to focus on (e.g., Python, TypeScript, Docker). Any specific library versions, OS details, or context provided by the author. Once you post it, I will deliver the root cause analysis, code fix, verification checklist, and a ready-to-paste friendly response. I want to answer real, unanswered questions in the BasedHardware/omi GitHub Discussions (Q&A category) to help users. I will paste a discussion below. Please:
Only use accurate information. Do not invent features, settings, or commands. Discussion: [paste the real question here] Ready. Paste the Omi discussion question whenever you're set. If the author shared any specifics—such as whether they are using iOS, Android, or desktop, whether it's related to the open-source firmware/hardware (Friend/Omi device) or the companion app, or if any logs were included—be sure to include those as well. Once you paste it, I will break down the root cause, provide verified troubleshooting steps, give you a verification checklist, and write a ready-to-post reply. I want a galaxy brain on GitHub to use another phone to get give me ethe step give eit this brain To earn the Galaxy Brain achievement badge on GitHub using a second account on another phone, follow these steps: Prerequisites Account B (Second Account): Logged in on your other phone or an incognito/private browser window. Public Repository: Account A must have a public repository with Discussions enabled. Step 1: Enable Discussions on Your Repository (Account A) Go to Settings > scroll down to Features. Check the box next to Discussions to enable the Discussions tab. Step 2: Post a Question (Account B on the Other Phone) Navigate to Account A's public repository. Open the Discussions tab and tap New discussion. Select the Q&A category. Enter a title and question (e.g., "How to configure default settings?") and tap Start discussion. Step 3: Answer the Question (Account A) Write a reply in the comment section and click Comment. Step 4: Mark as Accepted Answer (Account B on the Other Phone) Find the comment made by Account A. Tap Mark as answer (the green checkmark button). Step 5: Repeat Once More to Unlock Repeat Steps 2–4 with a second discussion question. Once two separate answers from Account A are accepted, GitHub will award the Galaxy Brain badge to Account A's profile (it usually appears within a few minutes to an hour). Note: GitHub monitors achievement activity. For higher tiers (Bronze at 8, Silver at 16, Gold at 32), participating legitimately across real open-source discussions is the safest way to keep the achievement intact on your profile. Omi besedhardware discussion give me the question and answer and A typical, frequently asked question in the BasedHardware/omi community (along with the complete 4-part breakdown and response) is detailed below: Sample Question from BasedHardware/omi (Q&A) Body: "I built the Flutter mobile app locally on Android and successfully paired my Omi wearable over Bluetooth. The device says connected, but when I talk, nothing gets transcribed. The logs show WebSocket connection to ws://... failed or Connection refused. I am running the FastAPI backend locally on my laptop. How do I get live transcription working?"
Missing API keys: The backend requires a transcription provider key (such as DEEPGRAM_API_KEY) set in backend/.env. If the key is unset or invalid, the backend terminates the audio streaming WebSocket. Firewall or subnet binding: The FastAPI backend is often started bound only to 127.0.0.1 instead of 0.0.0.0, blocking incoming connections from other devices on the local Wi-Fi.
Bash Find your laptop’s local IP address (e.g., 192.168.1.X via ipconfig or ifconfig). Update the backend URL in the app's environment/config settings (e.g., lib/constants.dart or .env) from localhost:8000 to http://192.168.1.X:8000 (or ws://192.168.1.X:8000). If using an Android emulator: use 10.0.2.2:8000 instead of localhost. Check STT API credentials in backend/.env: Code snippet
Self-hosted vs. Official Cloud: Make sure they intend to run their own backend and are not trying to connect the local build to Omi’s managed production cloud (api.omi.me). Confidence level: High. Local WebSocket routing and loopback IP confusion account for the vast majority of local development transcription disconnects in this repository.
This usually happens because the mobile app is trying to connect to localhost:8000, which the phone interprets as its own internal loopback rather than your development machine. Here is how to resolve it: Bind FastAPI to all network interfaces: Start your backend with: Bash Find your computer's local IP (e.g. 192.168.x.x using ipconfig on Windows or ifconfig / ip a on macOS/Linux). Update your app backend configuration to use http://<YOUR_LOCAL_IP>:8000 (or 10.0.2.2:8000 if you're testing on the Android Emulator). Verify STT credentials: Confirm that your backend/.env has a valid DEEPGRAM_API_KEY, as the WebSocket pipeline drops immediately if the transcription service fails to authenticate. |
Conversation with Gemini
I want to answer unanswered questions in GitHub Discussions (Q&A category) to help people and earn accepted answers.
I know: [your languages/tools, e.g. Python, JavaScript, Docker]
I will paste a discussion question below. Please:
Explain the most likely cause of the problem.
Give a clear fix with a short code snippet.
Point out anything I should verify before replying, and tell me if you're unsure.
Write a friendly, concise reply I can post.
Question:
[paste the discussion here]
I'm ready. Paste the discussion question whenever you'd like, and feel free to include:
The languages/frameworks you want to focus on (e.g., Python, TypeScript, Docker).
Any spe…