Skip to content
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

when i run npm run dev and http://localhost:3000/ in the same pc, it does work #500

Open
dcmouth opened this issue Dec 24, 2024 · 3 comments

Comments

@dcmouth
Copy link

dcmouth commented Dec 24, 2024

i run npm run dev then it appers
image
and then I entered http://localhost:3000/ in the browser, and then the page displayed as follows:
image
and the nvp log listed as follow
0 verbose cli /opt/homebrew/Cellar/node/22.9.0_1/bin/node /opt/homebrew/bin/npm
1 info using npm@10.8.3
2 info using node@v22.9.0
3 silly config load:file:/opt/homebrew/lib/node_modules/npm/npmrc
4 silly config load:file:/Users/lipuyue/Desktop/project/openai-realtime-console/.npmrc
5 silly config load:file:/Users/lipuyue/.npmrc
6 silly config load:file:/opt/homebrew/etc/npmrc
7 verbose title npm run dev
8 verbose argv "run" "dev"
9 verbose logfile logs-max:10 dir:/Users/lipuyue/.npm/_logs/2024-12-24T08_39_35_669Z-
10 verbose logfile /Users/lipuyue/.npm/_logs/2024-12-24T08_39_35_669Z-debug-0.log
11 silly logfile start cleaning logs, removing 1 files
12 silly logfile done cleaning log files
~
then I clink start session ,but it doesnt work ,and button get gray
image
how can i do to let it work?

@gozie11
Copy link

gozie11 commented Dec 27, 2024

tldr; Double check that $OPENAI_API_KEY is set.

I just had this issue. After opening the developer console in chrome, I noticed const EPHEMERAL_KEY = data.client_secret.value; from line 18 in component/App.jsx was having an issue getting the client secret.

I ran echo $OPENAI_API_KEY and noticed the variable was missing.

After resetting the variable it worked for me! I hope it helps you.

@evasfra
Copy link

evasfra commented Dec 30, 2024

tldr; Double check that $OPENAI_API_KEY is set.

I just had this issue. After opening the developer console in chrome, I noticed const EPHEMERAL_KEY = data.client_secret.value; from line 18 in component/App.jsx was having an issue getting the client secret.

I ran echo $OPENAI_API_KEY and noticed the variable was missing.

After resetting the variable it worked for me! I hope it helps you.

I have the same issue, but the API key variable is set correctly. Any other way to troubleshoot this?

@ihmily
Copy link

ihmily commented Jan 14, 2025

@evasfra @dcmouth

The same error I solved. If open the web broswer console,you may see this error

App.jsx:29  Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getUserMedia')
    at startSession (App.jsx:29:45)

Because when load the page, it will request the microphone permission in https://github.com/openai/openai-realtime-console/blob/main/client/components/App.jsx#L29C2-L32C36

    const ms = await navigator.mediaDevices.getUserMedia({
      audio: true,
    });
    pc.addTrack(ms.getTracks()[0]);

But this permission can only be granted in a local address or HTTPS secure environment,so you should ensure that your page Run in http://localhost:port or use HTTPS to access the website.

Finally, ensure that the device accessing the page has a microphone driver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants