OpenAI Realtime API Client for Python
This is an experimental OpenAI Realtime API client for Python and LlamaIndex. It integrates with LlamaIndex's tools, allowing you to quickly build custom voice assistants.
Include two examples that run directly in the terminal -- using both manual and Server VAD mode (i.e. allowing you to interrupt the chatbot).
Installation
Install system deps:
brew install ffmpeg
Install python deps:
pip install openai-realtime-client
# Optional: clone the repo and run the examples locally
git clone https://github.com/run-llama/openai_realtime_client.git
cd openai_realtime_client
Set your openai key:
export OPENAI_API_KEY="sk-..."
Usage
Assuming you installed and cloned the repo (or copy-pasted the examples), you can immediately run the examples.
Run the interactive CLI with manual VAD (try asking for your phone number to see function calling in action):
python ./examples/manual_cli.py
Or to use streaming mode (which allows you to interrupt the chatbot):
python ./examples/streaming_cli.py
NOTE: Streaming mode can be a little janky, best to use headphones in a quiet environment.
Take a look at the examples, add your own tools, and build something amazing!
Metadata
Release files for openai-realtime-client 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openai_realtime_client-0.1.0.tar.gz | 7.7 kB | Without provenance | Details for openai_realtime_client-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openai_realtime_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for openai_realtime_client-0.1.0-py3-none-any.whl |
Total release size: 16.6 kB
Release files / openai_realtime_client-0.1.0.tar.gz
| Download URL | openai_realtime_client-0.1.0.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a6344d625c92b9ff53f9c42bc71e4946e46a1216d48c691c1812371927ce42a
|
|
BLAKE2b-256 checksum How to use checksums |
820c9815245936af960389fce0314a5632f6d74a44416bd1bbc1fc55508363de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.10.12 Darwin/22.3.0
|
Release files / openai_realtime_client-0.1.0-py3-none-any.whl
| Download URL | openai_realtime_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8ad6b01ed154834b0ddfea6619ff9e849c462714580690111d25832dcbf4250
|
|
BLAKE2b-256 checksum How to use checksums |
a20630819100fea0e19d4011f8bb8049b5235d3856721ebf3af35bb7f196c69e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.10.12 Darwin/22.3.0
|
Security for openai-realtime-client 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.