-
Notifications
You must be signed in to change notification settings - Fork 0
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
Operator-to-robot Text-to-Speech #64
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello-amal
changed the title
[WIP] Operator-to-robot Text-to-Speech
Operator-to-robot Text-to-Speech
Jul 10, 2024
Ran all tests on |
@hello-amal All the tests pass on
|
|
Ah yes, I completely forgot that we had discussed (2). That sounds good, we can revisit that. |
hello-vinitha
approved these changes
Jul 15, 2024
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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