-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenAI Realtime demo #285
OpenAI Realtime demo #285
Conversation
|
||
## Description and steps | ||
|
||
This demo shows how to use Membrane Framework to create a simple app that allows you to have a conversation with ChatGPT using the newest OpenAI Realtime API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about linking to OpenAI page here?
) | ||
end | ||
|
||
def handle_frame(frame, state) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def handle_frame(frame, state) do | |
@impl true | |
def handle_frame(frame, state) do |
end | ||
``` | ||
|
||
Then, we will write a Membrane Element that will receive and send raw audio frames via the WebSocket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, we will write a Membrane Element that will receive and send raw audio frames via the WebSocket. | |
Then, we will create a Membrane Element that will receive and send raw audio frames via the WebSocket. |
Because WebRTC requires and provides audio in OPUS format and OpenAI Realtime API uses raw audio, we have to spawn the proper encoder and decoder between WebRTC and OpenAI elements. | ||
|
||
```elixir | ||
defmodule BrowserToOpenAi do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defmodule BrowserToOpenAi do | |
defmodule BrowserToOpenAI do |
:ok | ||
``` | ||
|
||
Now, let's start the pipeline. Enter <http://localhost:8000/index.html> from the new tab of Google Chrome and start your conversation with the AI! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move the sentence starting at "Enter ..." below the code snippet
|
||
## Description and steps | ||
|
||
This demo shows how to use Membrane Framework to create a simple app that allows you to have a conversation with ChatGPT using the newest OpenAI Realtime API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about something like this?
This demo shows how to use Membrane Framework to create a simple app that allows you to have a conversation with ChatGPT using the newest OpenAI Realtime API. | |
This demo shows how to use Membrane Framework to create a simple WebRTC based app that allows you to have a conversation with ChatGPT using the newest OpenAI Realtime API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
No description provided.