Skip to content
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

[WIP] Merge develop/fetch branch #383

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
9c4913f
[dialogflow_task_executive] support launch_args of app_manager
sktometometo Oct 20, 2021
18fda64
[dialogflow_task_executive] fix format
sktometometo Oct 25, 2021
69905e8
[dialogflow_task_executive] fix format
sktometometo Oct 25, 2021
363a0c4
[dialogflow_task_executive] fix format
sktometometo Oct 25, 2021
da5a52d
[dialogflow_task_executive] fix format
sktometometo Oct 25, 2021
ae01420
Add voicevox (AI speech synthesis) package
iory Apr 16, 2022
05ff06a
[voicevox] Add README
iory Apr 17, 2022
1150f2b
[voicevox] Add TERM
iory Apr 17, 2022
62c301c
[voicevox] Refactor Makefiles
iory Apr 17, 2022
0e2e18f
[voicevox] Ignore build directory
iory Apr 17, 2022
55e33fb
[voicevox] Add python-requests
iory Apr 17, 2022
4710016
[voicevox] Fixed typo julius -> voicevox
iory Apr 18, 2022
a99446c
[voicevox] Add USE_SYSTEM_PACKAGES FALSE for building in melodic (#1)
tkmtnt7000 Apr 18, 2022
ae58c00
[voicevox] Install voicevox_engine using Makefile
iory Apr 18, 2022
e5f98f3
[voicevox] Fixed speaker id and voice name
iory Apr 18, 2022
15eb283
[voicevox] Use python3 as default
iory Apr 18, 2022
c9a4b79
[voicevox] Convert bytes to str
iory Apr 18, 2022
58eac3c
[voicevox] Addy DEFAULT SPEAKER ID
iory Apr 18, 2022
65b95b1
[voicevox] Install open_jtalk_dic
iory Apr 18, 2022
3b28908
[voicevox] Load downloaded of open_jtalk_dic
iory Apr 18, 2022
bac8068
[voicevox] Add tips
iory Apr 18, 2022
5b7dd11
[voicevox] Remove unnecessary install step
iory Apr 19, 2022
9e512d9
[voicevox] Add get_cache_dir and check md5sum function
iory May 28, 2022
ad273cf
[voicevox] Enable cache
iory May 28, 2022
baeaa2a
[voicevox] Set default cpu numthreads to 1
iory May 28, 2022
ce54a3a
[dialogflow_task_executive] Fix bug; add error handling to around lau…
tkmtnt7000 Jun 7, 2022
cb33709
[respeaker_ros] Publish audio_info
iory Jun 11, 2022
861ca1f
[respeaker_ros] Enable speech to text for multi channel.
iory Jun 11, 2022
3883bb2
[respeaker_ros] Add audio_info arg in sample
iory Jun 11, 2022
cb28ecb
[respeaker_ros] Add publish_multichannel option for publishing multi …
iory Jun 11, 2022
9a9f123
[respeaker_ros] Restore audio input to use argment's audio
iory Jun 12, 2022
aa86177
[respeaker_ros] Add publish_multichannel option to fix launch file er…
iory Jun 13, 2022
594fb79
[respeaker_ros] Add roslaunch_add_file_check to test launch file format
iory Jun 13, 2022
b95f400
[respeaker_ros] Set audio_info topic name and check length of it.
iory Jun 13, 2022
1560ed3
[respeaker_ros] Add comment for why we add publish_multichannel option.
iory Jun 13, 2022
54a1e21
[respeaker_ros] Remove publish_multichannel option and publish raw mu…
iory Jun 13, 2022
49b0167
[respeaker_ros] Publish spech_audio_raw
iory Jun 13, 2022
d8fa7c2
[respeaker_ros] Add comment to know more defails
iory Jun 13, 2022
e41151f
[respeaker_ros] Publish speech audio raw
iory Jun 13, 2022
1c209c7
[respeaker_ros] Add parameters for respaker ros
iory Jun 13, 2022
dcf0387
[respeaker_ros] Fixed publishing audio topic's namespace
iory Jun 13, 2022
05ae1df
[respeaker_ros] Add parameters for speech_to_text
iory Jun 13, 2022
1eba649
[respeaker_ros] Avoid AudioInfo import for backward compatibility
iory Jun 14, 2022
1b11375
[respeaker_ros] Fixed bytes calculation 'self.n_channe - 2' -> '(self…
iory Jun 14, 2022
469dc62
[rostwitter] Enable to tweet with 280(hankaku) characters
iory Aug 16, 2022
4b6e33e
[rostwitter] Fixed encoding for python2
iory Aug 16, 2022
18503bb
[rostwitter] Changed so that strings longer than 140 characters are d…
iory Aug 16, 2022
820f39d
[rostwitter] Remove _check_and_split_word function
iory Aug 17, 2022
83a7eb4
[rostwitter] Add cv_utils to encode/decode image and extract images f…
iory Aug 17, 2022
c506833
[rostwitter] Use SafeLoader for yaml.load
iory Aug 17, 2022
91132e7
[rostwitter] Support extracting base64 images and tweet them from text.
iory Aug 17, 2022
519b3d9
[rostwitter] Delete StringIO. StringIO eliminates newline \n
iory Aug 19, 2022
09e5f22
[rostwitter] Separate tweets by image.
iory Aug 20, 2022
583bde1
[rostwitter] import izip_longest for python2 compatibility
iory Aug 22, 2022
70f37ad
[rostwitter] Fixed input is text only case
iory Aug 23, 2022
145dced
[rostwitter] Add launch file
iory Aug 23, 2022
e8e7ff7
[rostwitter] Add README
iory Aug 23, 2022
5de5c22
[rostwitter] Assume base64 images are not contiguous without spaces
iory Sep 1, 2022
afa1871
[rostwitter] Add document for base64 image
iory Sep 1, 2022
3cf64e1
[rostwitter] Add status_code to check error
iory Sep 22, 2022
88d19b4
[rostwitter] Avoid error when tweet post returning error code
iory Sep 22, 2022
647f7f7
[rostwitter] Add error_code to check error (#6)
nakane11 Sep 22, 2022
324abaa
[rostwitter] Fix _check_post_request (#7)
nakane11 Sep 24, 2022
7c9eb0f
add launch_sound_play arg in voicevox launch
knorth55 Oct 13, 2022
1fb086a
[google_chat_ros] Fix https to url
tkmtnt7000 Aug 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions 3rdparty/voicevox/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build
dict
lib
node_scripts/voicevox_engine
requirements.txt
!.gitignore
73 changes: 73 additions & 0 deletions 3rdparty/voicevox/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
cmake_minimum_required(VERSION 2.8.3)
project(voicevox)

find_package(catkin REQUIRED
COMPONENTS
catkin_virtualenv
)

catkin_python_setup()

set(INSTALL_DIR ${PROJECT_SOURCE_DIR})

catkin_package()

catkin_generate_virtualenv(
INPUT_REQUIREMENTS requirements.in
PYTHON_INTERPRETER python3
USE_SYSTEM_PACKAGES FALSE
)

add_custom_command(
OUTPUT voicevox_model_installed
COMMAND make -f ${PROJECT_SOURCE_DIR}/Makefile.model
MD5SUM_DIR=${PROJECT_SOURCE_DIR}/md5sum
INSTALL_DIR=${INSTALL_DIR}
)


add_custom_command(
OUTPUT voicevox_core_installed
COMMAND make -f ${PROJECT_SOURCE_DIR}/Makefile.core
MD5SUM_DIR=${PROJECT_SOURCE_DIR}/md5sum
INSTALL_DIR=${INSTALL_DIR}
)

add_custom_command(
OUTPUT voicevox_engine_installed
COMMAND make -f ${PROJECT_SOURCE_DIR}/Makefile.engine
MD5SUM_DIR=${PROJECT_SOURCE_DIR}/md5sum
INSTALL_DIR=${INSTALL_DIR}
)

add_custom_command(
OUTPUT open_jtalk_dic_installed
COMMAND make -f ${PROJECT_SOURCE_DIR}/Makefile.open_jtalk_dic
MD5SUM_DIR=${PROJECT_SOURCE_DIR}/md5sum
INSTALL_DIR=${INSTALL_DIR}
)

add_custom_target(all_installed ALL DEPENDS
voicevox_model_installed
voicevox_core_installed
voicevox_engine_installed
open_jtalk_dic_installed)

file(GLOB NODE_SCRIPTS_FILES node_scripts/*.py)
catkin_install_python(
PROGRAMS ${NODE_SCRIPTS_FILES}
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}/node_scripts/
)
install(DIRECTORY node_scripts/voicevox_engine
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/catkin_virtualenv_scripts/
USE_SOURCE_PERMISSIONS)
install(DIRECTORY launch dict
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS)
install(PROGRAMS bin/text2wave
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/bin)

install(DIRECTORY
${INSTALL_DIR}/lib
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS)
11 changes: 11 additions & 0 deletions 3rdparty/voicevox/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
all:
make -f Makefile.core
make -f Makefile.model
make -f Makefile.engine
make -f Makefile.open_jtalk_dic
clean:
make -f Makefile.core clean
make -f Makefile.model clean
make -f Makefile.engine clean
make -f Makefile.open_jtalk_dic clean
rm -rf build
28 changes: 28 additions & 0 deletions 3rdparty/voicevox/Makefile.core
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*- makefile -*-

all: installed.viocevox_core

VERSION = 0.11.4
FILENAME = core.zip
TARBALL = build/$(FILENAME)
TARBALL_URL = "https://github.com/VOICEVOX/voicevox_core/releases/download/$(VERSION)/core.zip"
SOURCE_DIR = build/core
UNPACK_CMD = unzip
MD5SUM_DIR = $(CURDIR)/md5sum
MD5SUM_FILE = $(MD5SUM_DIR)/$(FILENAME).md5sum
SCRIPT_DIR = $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
include $(shell rospack find mk)/download_unpack_build.mk
INSTALL_DIR = './'


installed.viocevox_core: $(SOURCE_DIR)/unpacked
mkdir -p $(INSTALL_DIR)/lib
cp build/core/lib*.so $(INSTALL_DIR)/lib/
cp build/core/*.bin $(INSTALL_DIR)/lib/
cp build/core/metas.json $(INSTALL_DIR)/lib/metas.json

clean:
rm -rf $(TARBALL)
rm -rf $(SOURCE_DIR)
rm -rf $(INSTALL_DIR)/lib
rm -rf build
24 changes: 24 additions & 0 deletions 3rdparty/voicevox/Makefile.engine
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- makefile -*-

all: installed.voicevox_engine

VERSION = 0.11.4
FILENAME = $(VERSION).tar.gz
TARBALL = build/$(FILENAME)
TARBALL_URL = "https://github.com/VOICEVOX/voicevox_engine/archive/refs/tags/$(FILENAME)"
SOURCE_DIR = build/voicevox_engine-$(VERSION)
UNPACK_CMD = tar xvzf
MD5SUM_DIR = $(CURDIR)/md5sum
MD5SUM_FILE = $(MD5SUM_DIR)/voicevox_engine.tar.gz.md5sum
include $(shell rospack find mk)/download_unpack_build.mk
INSTALL_DIR = './'


installed.voicevox_engine: $(SOURCE_DIR)/unpacked
cp -r build/voicevox_engine-$(VERSION) $(INSTALL_DIR)/node_scripts/voicevox_engine

clean:
rm -rf $(TARBALL)
rm -rf $(SOURCE_DIR)
rm -rf $(INSTALL_DIR)/node_scripts/voicevox_engine
rm -rf build
26 changes: 26 additions & 0 deletions 3rdparty/voicevox/Makefile.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- makefile -*-

all: installed.voicevox_model

VERSION = 1.10.0
FILENAME = onnxruntime-linux-x64-$(VERSION).tgz
TARBALL = build/$(FILENAME)
TARBALL_URL = "https://github.com/microsoft/onnxruntime/releases/download/v$(VERSION)/$(FILENAME)"
SOURCE_DIR = build/onnxruntime-linux-x64-$(VERSION)
UNPACK_CMD = tar xvzf
MD5SUM_DIR = $(CURDIR)/md5sum
MD5SUM_FILE = $(MD5SUM_DIR)/$(FILENAME).md5sum
SCRIPT_DIR = $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
include $(shell rospack find mk)/download_unpack_build.mk
INSTALL_DIR = './'


installed.voicevox_model: $(SOURCE_DIR)/unpacked
mkdir -p $(INSTALL_DIR)/lib
cp build/onnxruntime-linux-x64-$(VERSION)/lib/* $(INSTALL_DIR)/lib

clean:
rm -rf $(TARBALL)
rm -rf $(SOURCE_DIR)
rm -rf $(INSTALL_DIR)/lib
rm -rf build
25 changes: 25 additions & 0 deletions 3rdparty/voicevox/Makefile.open_jtalk_dic
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- makefile -*-

all: installed.open_jtalk_dic

VERSION = 1.11.1
FILENAME = open_jtalk_dic_utf_8-1.11.tar.gz
TARBALL = build/$(FILENAME)
TARBALL_URL = "https://github.com/r9y9/open_jtalk/releases/download/v$(VERSION)/$(FILENAME)"
SOURCE_DIR = build/open_jtalk_dic_utf_8-1.11
UNPACK_CMD = tar xvzf
MD5SUM_DIR = $(CURDIR)/md5sum
MD5SUM_FILE = $(MD5SUM_DIR)/open_jtalk_dic.tar.gz.md5sum
include $(shell rospack find mk)/download_unpack_build.mk
INSTALL_DIR = './'


installed.open_jtalk_dic: $(SOURCE_DIR)/unpacked
mkdir -p $(INSTALL_DIR)/dict
cp -r build/open_jtalk_dic_utf_8-1.11 $(INSTALL_DIR)/dict

clean:
rm -rf $(TARBALL)
rm -rf $(SOURCE_DIR)
rm -rf $(INSTALL_DIR)/dict/open_jtalk_dic_utf_8-1.11
rm -rf build
103 changes: 103 additions & 0 deletions 3rdparty/voicevox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# voicevox

ROS Interface for [VOICEVOX](https://voicevox.hiroshiba.jp/) (AI speech synthesis)

## TERM

[VOICEVOX](https://voicevox.hiroshiba.jp/) is basically free to use, but please check the terms of use below.

[TERM](https://voicevox.hiroshiba.jp/term)

Each voice synthesis character has its own rules. Please use this package according to those terms.

| Character name | term link |
| ---- | ---- |
| 四国めたん | https://zunko.jp/con_ongen_kiyaku.html |
| ずんだもん | https://zunko.jp/con_ongen_kiyaku.html |
| 春日部つむぎ | https://tsukushinyoki10.wixsite.com/ktsumugiofficial/利用規約 |
| 波音リツ | http://canon-voice.com/kiyaku.html |
| 雨晴はう | https://amehau.com/?page_id=225 |
| 玄野武宏 | https://virvoxproject.wixsite.com/official/voicevoxの利用規約 |
| 白上虎太郎 | https://virvoxproject.wixsite.com/official/voicevoxの利用規約 |
| 青山龍星 | https://virvoxproject.wixsite.com/official/voicevoxの利用規約 |
| 冥鳴ひまり | https://kotoran8zunzun.wixsite.com/my-site/利用規約 |
| 九州そら | https://zunko.jp/con_ongen_kiyaku.html |

## Installation

Build this package.

```bash
cd /path/to/catkin_workspace
catkin build voicevox
```

## Usage

### Launch sound_play with VOICEVOX Text-to-Speech

```bash
roslaunch voicevox voicevox_texttospeech.launch
```

<a id="saysomething"></a>
### Say something

#### For python users

```python
import rospy
from sound_play.libsoundplay import SoundClient

rospy.init_node('say_node')

client = SoundClient(sound_action='robotsound_jp', sound_topic='robotsound_jp')

client.say('こんにちは', voice='四国めたん-あまあま')
```

You can change the voice by changing the voice_name.
You can also specify the speaker id.
Look at the following tables for further details.

| speaker_id | voice_name |
| ---- | ---- |
| 0 | 四国めたん-あまあま |
| 1 | ずんだもん-あまあま |
| 2 | 四国めたん-ノーマル |
| 3 | ずんだもん-ノーマル |
| 4 | 四国めたん-セクシー |
| 5 | ずんだもん-セクシー |
| 6 | 四国めたん-ツンツン |
| 7 | ずんだもん-ツンツン |
| 8 | 春日部つむぎ-ノーマル |
| 9 | 波音リツ-ノーマル |
| 10 | 雨晴はう-ノーマル |
| 11 | 玄野武宏-ノーマル |
| 12 | 白上虎太郎-ノーマル |
| 13 | 青山龍星-ノーマル |
| 14 | 冥鳴ひまり-ノーマル |
| 15 | 九州そら-あまあま |
| 16 | 九州そら-ノーマル |
| 17 | 九州そら-セクシー |
| 18 | 九州そら-ツンツン |
| 19 | 九州そら-ささやき |

#### For roseus users

```
$ roseus
(load "package://pr2eus/speak.l")

(ros::roseus "say_node")

(speak "JSKへようこそ。" :lang "波音リツ" :wait t :topic-name "robotsound_jp")
```

### Tips

Normally, the server for speech synthesis starts up at `http://localhost:50021`.
You can change the url and port by setting values for `VOICEVOX_TEXTTOSPEECH_URL` and `VOICEVOX_TEXTTOSPEECH_PORT`.

You can also set the default character by setting `VOICEVOX_DEFAULT_SPEAKER_ID`.
Please refer to [here](#saysomething) for the speaker id.
Loading
Loading