| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This project demonstrates how to deliver ultra-low latency access to OpenAI with exceptional audio quality using Agora's SD-RTN and OpenAI's Realtime API. By integrating Agora's SDK with OpenAI's Realtime API, it ensures seamless performance and minimal delay across the globe.
Before running the demo, ensure you have the following installed and configured:
Python 3.11 or above
Agora account:
OpenAI account:
Additional Packages:
brew install ffmpeg portaudiosudo apt install portaudio19-dev python3-dev build-essential
sudo apt install ffmpeg
cp .env.example .envpython3 -m venv venv && source venv/bin/activatepip install -r requirements.txtpython -m realtime_agent.main agent --channel_name=<channel_name> --uid=<agent_uid>python -m realtime_agent.main serverThis api starts an agent with given graph and override properties. The started agent will join into the specified channel, and subscribe to the uid which your browser/device's rtc use to join.
| Param | Description |
|---|---|
| channel_name | (string) channel name, it needs to be the same with the one your browser/device joins, agent needs to stay with your browser/device in the same channel to communicate |
| uid | (int)the uid which ai agent use to join |
| system_instruction | The system instruction for the agent |
| voice | The voice of the agent |
Example:
curl 'http://localhost:8080/start_agent' \
-H 'Content-Type: application/json' \
--data-raw '{
"channel_name": "test",
"uid": 123
}'This api stops the agent you started
| Param | Description |
|---|---|
| channel_name | (string) channel name, the one you used to start the agent |
Example:
curl 'http://localhost:8080/stop_agent' \
-H 'Content-Type: application/json' \
--data-raw '{
"channel_name": "test"
}'To test agents, use Agora's Voice Call Demo.
| Back | FazBrowse Home | New Git URL |