Skip to content

Bug: demo/gemini_audio_video/app.py gradio webpage shows Illegal header value b'Bearer ' #308

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

Closed
ahundt opened this issue May 9, 2025 · 1 comment

Comments

@ahundt
Copy link

ahundt commented May 9, 2025

I was trying to finish up #88 and I started out by running the current functionality on the main branch (not the pull request's code):

demo/gemini_audio_video/app.py launches, but when I try to hit record on the video I get the following popup in the web ui (nothing prints to terminal):

Illegal header value b'Bearer '

It looks like it might relate to this line:

"Authorization": f"Bearer {token}",
as that's the only instance of Bearer in fastrtc itself.

I already ruled out alternative causes like the gemini api key which is working. I think this is likely a fastrtc bug, but I'm not sure. Thanks for giving this a look.

@freddyaboulton
Copy link
Collaborator

Hi @ahundt ! Yea instead of using twilio for the TURN server, I am using cloudflare through a hugging face token. It's free if you have a hugging face account. You can just delete all mentions of get_hf_turn_credentials from the gemini script though if you're running locally.

I think that fixes your issue so I will close.

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

2 participants