https://github.com/koide3/ros2d2
A ROS package to make R2D2-like sound
https://github.com/koide3/ros2d2
r2d2 ros sound voice
Last synced: over 1 year ago
JSON representation
A ROS package to make R2D2-like sound
- Host: GitHub
- URL: https://github.com/koide3/ros2d2
- Owner: koide3
- Created: 2019-10-17T07:55:10.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-21T01:26:43.000Z (almost 7 years ago)
- Last Synced: 2025-03-21T22:21:53.727Z (over 1 year ago)
- Topics: r2d2, ros, sound, voice
- Language: C
- Size: 85 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ros2d2
*ros2d2* is a ROS package to make R2D2-like sounds. It is based on the following libraries:
- r2d2-voice to synthesize prametric beep sounds (like whistle)
- ttastromech to transform texts into R2D2 sounds

## Installation
```bash
pip install ttastromech
cd ~/catkin_ws/src
git clone https://github.com/koide3/ros2d2.git
cd ~/catkin_ws
catkin_make -DCMAKE_BUILD_TYPE=Release
```
You may need to install libasound2-dev:
```bash
sudo apt install libasound2-dev
```
## Usage
```bash
roslaunch ros2d2 ros2d2.launch
```
```bash
# play a preset beep sound
$ rostopic pub /ros2d2_node/preset std_msgs/String "data: 'whistle'"
# generate R2D2 sound from a text
$ rostopic pub /ros2d2_node/speak std_msgs/String "data: 'hello world'"
```
Audio: [whistle](data/sound/whistle.ogg), [hello world](data/sound/hello.ogg)
## Topics
#### /ros2d2_node/preset
You can play preset beep sounds synthesized by *r2d2-voice*. Default preset sounds are; whistle, tonedown, toneup, failure, alert, confuse, and calculate. They are defined by a csv file at *ros2d2/data/presets*. You can add new sounds by adding commands to the file.
#### /ros2d2_node/speak
With this topic, you can play R2D2 voice transformed from a text using *ttastromech*. It makes sound by translating each character in the text to corresponding predefined R2D2 sound.
#### /ros2d2_node/cmd_synth
This is a topic to make sound by directly giving commands to *r2d2-voice*. See r2d2-voice for the details of the command.
## License
This package is released under GPLv3 as r2d2-voice adopts this license.