Closed hello-amal closed 1 month ago
Ran all tests on 3030
, but the test to ensure the requirements are complete. @hello-vinitha can you run that on your robot, since it is a "clean" install (e.g., it shouldn't have any of these audio libraries?)
@hello-amal All the tests pass on 2051
. A couple of questions/suggestions:
pyTTS
/is there a scenario where a user would want to use pyTTS
over gTTS
? If yes, then I recommend adding this as an optional flag to the launch file and launch script. If not, I would recommend removing pyTTs.gTTS
uses Google's unofficial Google Translate API, which they may stop supporting at any time. So I think it is important to have pyttsx3
, even if its voices are not good. I'll add a launchfile flag for that.Ah yes, I completely forgot that we had discussed (2). That sounds good, we can revisit that.
Addressed the changes. Here is a screenshot of the updated color scheme.
Description
This PR adds operator to robot text-to-speech capabilities. Specifically, it adds:
TextToSpeechEngine
abstract class that can be used to support multiple engines in a plug-and-play fashion. gTTS and pyttsx3 are implemented.gTTS
).DropdownInput
, that behaves likeDropdown
but has a textarea to the left of the dropdown arrow.Select design decision
Testing procedure
pip3 install -r requirements.txt
), rebuild the workspace, and launch the web app (./launch_interface.sh
).gTTS
:ros2 topic pub /text_to_speech stretch_web_teleop/msg/TextToSpeech "{text: 'Hello, my name is Stretch, and I am a robot here to assist you', voice: 'com', is_slow: true}" --times 1
ros2 topic pub /text_to_speech stretch_web_teleop/msg/TextToSpeech "{text: 'Shut up, you are talking too slowly', voice: 'co.uk', override_behavior: 1}" --times 1
. Verify that the former interrupts, the latter plays, it is faster than the former, and it has a British accent.ros2 topic pub /text_to_speech stretch_web_teleop/msg/TextToSpeech "{text: 'I was waiting for you to finish before speaking', voice: 'co.in', is_slow: false}" --times 1
. Verify that the latter does not interrupt the former.pyTTSx3
by changing this line toengine_type=TextToSpeechEngineType.PYTTSX3
.ros2 topic pub /text_to_speech stretch_web_teleop/msg/TextToSpeech "{text: 'Hello, my name is Stretch, and I am a robot here to assist you', voice: 'english+m1', is_slow: true}" --times 1
ros2 topic pub /text_to_speech stretch_web_teleop/msg/TextToSpeech "{text: 'Shut up, you are talking too slowly', voice: 'english+f1', override_behavior: 1}" --times 1
. Verify that the former does not interrupt (because its not supported inpyttsx3
), it is faster than the former, and it has a British accent.ros2 topic pub /text_to_speech stretch_web_teleop/msg/TextToSpeech "{text: 'I was waiting for you to finish before speaking', voice: 'english+f4', is_slow: false}" --times 1
. Verify that the latter does not interrupt the former.Before opening a pull request
From the top-level of this repository, run:
pre-commit run --all-files
To merge
Squash & Merge