FastAPI WebSocket bridge between a Furhat robot and the OpenAI Realtime API
Project description
Copilotten.FurhatConnection
A FastAPI-based WebSocket bridge between a Furhat robot and the OpenAI Realtime API.
Furhat microphone (PCM16 audio @ 24 kHz)
│
▼
FastAPI /ws ──────► OpenAI Realtime API (gpt-4o-realtime-preview)
│ │ response.audio.delta → PCM16 audio
│◄─────────────────────┘
│ request_speak_audio_start/data/end
▼
Furhat robot (furhat-realtime-api)
Browser (monitor UI) ◄──── transcripts & status ──── FastAPI /ws
Installation
pip install furhat-bridge
Quick start
# Start the bridge server (binds to 0.0.0.0:8000 by default)
furhat-bridge
# Custom host/port
furhat-bridge --host 127.0.0.1 --port 9000
# Development mode with auto-reload
furhat-bridge --reload
# Or with uvicorn directly
uvicorn furhat_bridge.server:app --reload
Then open http://localhost:8000 in your browser, enter the Furhat IP address and your OpenAI API key, and click Connect.
Development (from source)
# Clone and install in editable mode
git clone https://github.com/Nedomkull-Mathematical-Modeling/Copilotten.FurhatConnection
cd Copilotten.FurhatConnection
pip install -e .
# Or install only the dependencies without packaging
pip install -r requirements.txt
uvicorn main:app --reload
Publishing to PyPI
pip install build twine
python -m build
twine upload dist/*
How it works
- The browser opens a WebSocket to
/wsand sends aconfigmessage with the Furhat IP and OpenAI API key. - The server connects to the Furhat robot using
furhat-realtime-api(AsyncFurhatClient) and to the OpenAI Realtime API via WebSocket. - On
session.created, the server configures the OpenAI session (audio in/out, server-side VAD, Whisper transcription) and triggers an initial greeting from Copilotten. - When OpenAI is generating a response, the Furhat microphone is paused. OpenAI's audio deltas are streamed directly to the Furhat robot for real-time lipsync playback.
- When Furhat finishes speaking (
response.speak.end), the microphone resumes and the user can speak. The Furhat microphone audio (PCM16, 24 kHz, mono) is forwarded to OpenAI usinginput_audio_buffer.append. - OpenAI's server-side VAD detects speech boundaries automatically.
- Transcripts (both user speech via Whisper and assistant replies) are displayed in the browser in real time.
Requirements
- Python 3.10+
- A Furhat robot accessible on the local network
- An OpenAI API key with access to the Realtime API
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file furhat_bridge-0.1.0.tar.gz.
File metadata
- Download URL: furhat_bridge-0.1.0.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
351cf765e9c12bc472d45551913fa0a82c17e7f5ac0ac491a9062ccd26730174
|
|
| MD5 |
1e0475f34401e85e9307436b258a186d
|
|
| BLAKE2b-256 |
21d37fb7cd43f2fc79f00e66b132126e46810d149cfb86c75d696aee80321a6b
|
Provenance
The following attestation bundles were made for furhat_bridge-0.1.0.tar.gz:
Publisher:
publish.yml on Nedomkull-Mathematical-Modeling/Copilotten.FurhatConnection
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
furhat_bridge-0.1.0.tar.gz -
Subject digest:
351cf765e9c12bc472d45551913fa0a82c17e7f5ac0ac491a9062ccd26730174 - Sigstore transparency entry: 1283038366
- Sigstore integration time:
-
Permalink:
Nedomkull-Mathematical-Modeling/Copilotten.FurhatConnection@d0dbb9a98d95359ecee3b7f9c664292340f78fe9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Nedomkull-Mathematical-Modeling
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d0dbb9a98d95359ecee3b7f9c664292340f78fe9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file furhat_bridge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: furhat_bridge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
400785b5cb128f797f8a29e13ac95a6ffce9c888b5dce8e43ade784505fb349d
|
|
| MD5 |
a9df861f8e03554dce2014a5d82e39e8
|
|
| BLAKE2b-256 |
d2137d07dd9aefd3b6568dd154c1aa92e91b040b36d4a681fdb74e34e4fd5bbb
|
Provenance
The following attestation bundles were made for furhat_bridge-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Nedomkull-Mathematical-Modeling/Copilotten.FurhatConnection
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
furhat_bridge-0.1.0-py3-none-any.whl -
Subject digest:
400785b5cb128f797f8a29e13ac95a6ffce9c888b5dce8e43ade784505fb349d - Sigstore transparency entry: 1283038384
- Sigstore integration time:
-
Permalink:
Nedomkull-Mathematical-Modeling/Copilotten.FurhatConnection@d0dbb9a98d95359ecee3b7f9c664292340f78fe9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Nedomkull-Mathematical-Modeling
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d0dbb9a98d95359ecee3b7f9c664292340f78fe9 -
Trigger Event:
push
-
Statement type: