Hi everyone,
I am running stretch.app.ai_pickup with --use_llm and controlling the robot remotely from my workstation (Ubuntu PC).
By default, when the robot executes a "say" command, the audio plays from the robot’s onboard speaker.
I would like to instead hear all robot speech from my PC speakers (e.g., USB conference speaker connected to my workstation), not from the robot hardware.
Currently:
Hi @Mallak_Alqaisi,
We’ve implemented a small update that allows routing the TTS audio to your workstation instead of the robot. It hasn’t been merged into the main branch yet, but you’re welcome to try it out.
To test this:
-
On the robot side, everything remains the same, you can continue running the ROS2 bridge as usual:
./scripts/run_stretch_ai_ros2_bridge_server.sh
-
On your GPU/workstation machine, go to your stretch_ai repo:
cd ~/stretch_ai
-
Fetch the latest changes and switch to the feature branch:
git fetch
git checkout feature/tts-output-target
-
Run the app with the new flag:
python -m stretch.app.ai_pickup --use_llm --tts_target pc
The new --tts_target option lets you choose where audio is played:
robot (default): audio plays from the robot speaker
pc: audio plays from your workstation speakers
So if you don’t set the flag, behavior remains unchanged.
One important note: audio will play through whatever output device your GPU/workstation is using, so make sure your USB speaker (or desired audio device) is connected and selected there.
Also, if you’re interested, here is the PR for this change.
This what i got when i run the commands above:
Hi @Mallak_Alqaisi,
On the GPU/workstation side, you’ll still need to activate the environment and set the robot IP before running the app.
Could you try running the full pipeline like this on your GPU machine?
mamba activate stretch_ai
cd ~/stretch_ai
./scripts/set_robot_ip.sh <ROBOT_IP>
python -m stretch.app.ai_pickup --use_llm --tts_target pc
If it still doesn’t work after this, feel free to send over the output you’re seeing and I’ll take a closer look with you.
Best,
Jason
I got this error: Error: No such option: --tts_target
It looks like your local stretch_ai might not be on the branch that includes the --tts_target option.
Could you confirm which branch you’re on by running:
git branch
You should see feature/tts-output-target listed and selected.
If not, you can switch to it with:
git fetch
git checkout feature/tts-output-target
git branch
After switching, please try running the command again and let me know what you see.
Best,
Jason
It works well, Thank you very much.
But i still hear the sound from robot said: I find ball that i can reach, Can i convert this sound from robot’s speaker to PC’s speaker ?
Hi @Mallak_Alqaisi,
I took a closer look, and the reason you’re still hearing that message from the robot is that some parts of stretch_ai send speech directly to the robot speaker.
For example, the message I found a ball that I can reach comes from:
self.agent.robot_say(...)
which always plays through the robot.
If you’d like those messages to play from your workstation instead, you would need to replace those calls with:
self.agent.say(...)
so they use the local (PC) speaker.
Right now, --tts_target pc works for the main LLM responses, but some internal task messages are still using the robot speaker directly.
Best,
Jason