Can't get this demo to work locally with speech-to-speech

#2
by rsbdev - opened

Hey there! So I have the s2s github project fully installed and running in realtime mode on my local hardware, testing from a client device using the provided listen_and_play_realtime.py script.

I cloned this demo and tried to connect it to my local running instance by setting "export LOAD_BALANCER_URL=http://localhost:8765 " but when clicking the Tap to start button I get a "POST /api/session HTTP/1.1" 502 Bad Gateway with an error message Session handshake failed 404: {"detail":"Not Found"}.

smolagents org

Yes, that makes some sense. We rushed to release this demo, but it's using the deployed version of speech-to-speech which lives behind the load balancer. You would need to connect direcly to the compute for it to work locally. @A-Mahla will merge this demo to speech to speech soon and we'll add instructions. I'll ping you!

Hey there! So I have the s2s github project fully installed and running in realtime mode on my local hardware, testing from a client device using the provided listen_and_play_realtime.py script.

I cloned this demo and tried to connect it to my local running instance by setting "export LOAD_BALANCER_URL=http://localhost:8765 " but when clicking the Tap to start button I get a "POST /api/session HTTP/1.1" 502 Bad Gateway with an error message Session handshake failed 404: {"detail":"Not Found"}.

Press settings at right corner and past your local URL like
http://127.0.0.1:8765

image

smolagents org

Yes, thanks @GuestWho ! You can already use the settings UI in your locally hosted demo to target your deployed speech-to-speech server.
And as @andito said, I’ll very soon add this demo to the speech-to-speech repo, along with clear environment variables and instructions :)

Hey there! So I have the s2s github project fully installed and running in realtime mode on my local hardware, testing from a client device using the provided listen_and_play_realtime.py script.

I cloned this demo and tried to connect it to my local running instance by setting "export LOAD_BALANCER_URL=http://localhost:8765 " but when clicking the Tap to start button I get a "POST /api/session HTTP/1.1" 502 Bad Gateway with an error message Session handshake failed 404: {"detail":"Not Found"}.

Press settings at right corner and past your local URL like
http://127.0.0.1:8765

image

s2s-ws-client.js:536 WebSocket connection to 'ws://127.0.0.1:8765/v1/realtime' failed:
main.js:1399 [main] fatal: Error: WebSocket failed to open: error
at WebSocket.onceErr (s2s-ws-client.js:548:16)
s2s-ws-client.js:556 [ws] socket error
Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …} exception ??

smolagents org
edited Jul 9

Hi all!

I added the demo to the speech-to-speech repo, along with instructions to run it locally. Enjoy! This should close the topic :)

If you run into any issues, don’t hesitate to open an issue in the speech-to-speech repo.

rsbdev changed discussion status to closed

Sign up or log in to comment