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

Respeaker multi channel fetch15 #23

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
d4d3675
[dialogflow_task_executive] support launch_args of app_manager
sktometometo Oct 20, 2021
32661e1
[dialogflow_task_executive] fix format
sktometometo Oct 25, 2021
0aafc66
[dialogflow_task_executive] fix format
sktometometo Oct 25, 2021
e37b521
[dialogflow_task_executive] fix format
sktometometo Oct 25, 2021
e702a4f
[dialogflow_task_executive] fix format
sktometometo Oct 25, 2021
5550129
Support new version of voice_text API
mqcmd196 Nov 22, 2021
a814ee0
fix error handling
mqcmd196 Nov 23, 2021
6021983
set default library directory
mqcmd196 Nov 24, 2021
ee4352d
migrate api version to traditional source code
mqcmd196 Nov 24, 2021
09c6215
remove api source code
mqcmd196 Nov 24, 2021
3eb17dd
support vt attributes
mqcmd196 Nov 24, 2021
9a938e5
update README to support new voice text API
mqcmd196 Nov 24, 2021
dafedcb
fix member var bug
mqcmd196 Nov 24, 2021
28070af
adopt 15edef4564b84943b1c6e29c40b19ea4e8d437b7
mqcmd196 Dec 27, 2021
354487c
Restart voice text if verification fails
708yamaguchi Dec 16, 2021
a560c74
Add voicevox (AI speech synthesis) package
iory Apr 16, 2022
5ac7fdf
[voicevox] Add README
iory Apr 17, 2022
0cbf161
[voicevox] Add TERM
iory Apr 17, 2022
8b538d0
[voicevox] Refactor Makefiles
iory Apr 17, 2022
621489d
[voicevox] Ignore build directory
iory Apr 17, 2022
acf4ab2
[voicevox] Add python-requests
iory Apr 17, 2022
e680500
[voicevox] Fixed typo julius -> voicevox
iory Apr 18, 2022
0210f99
[voicevox] Add USE_SYSTEM_PACKAGES FALSE for building in melodic (#1)
tkmtnt7000 Apr 18, 2022
98c8a91
[voicevox] Install voicevox_engine using Makefile
iory Apr 18, 2022
d78df94
[voicevox] Fixed speaker id and voice name
iory Apr 18, 2022
ad352af
[voicevox] Use python3 as default
iory Apr 18, 2022
fcaee77
[voicevox] Convert bytes to str
iory Apr 18, 2022
d9f8ef1
[voicevox] Addy DEFAULT SPEAKER ID
iory Apr 18, 2022
02571ef
[voicevox] Install open_jtalk_dic
iory Apr 18, 2022
585ae70
[voicevox] Load downloaded of open_jtalk_dic
iory Apr 18, 2022
6711a71
[voicevox] Add tips
iory Apr 18, 2022
272d6a8
[voicevox] Remove unnecessary install step
iory Apr 19, 2022
7d97ba9
[google_chat_ros] google chat ros REST client
mqcmd196 Oct 20, 2021
0ffed59
[google_chat_ros] define new message for recieving message
mqcmd196 Dec 28, 2021
5211010
[google_chat_ros] support download data
mqcmd196 Jan 13, 2022
b2d7113
[google_chat_ros]fix REST bugs
mqcmd196 Jan 13, 2022
adeb4cd
[google_chat_ros]support dialogflow mode
mqcmd196 Jan 13, 2022
8d0f7df
[google_chat_ros]support download avatar
mqcmd196 Jan 13, 2022
0aaf6f7
[google_chat_ros]support dialogflow message publish
mqcmd196 Jan 13, 2022
fbd2fa9
[google_chat_ros]remove unnecessary response
mqcmd196 Jan 13, 2022
d2184b0
[google_chat_ros]add msg for card event and fix function style
mqcmd196 Jan 14, 2022
d58866a
[google_chat_ros]add gdrive_ros service client
mqcmd196 Jan 18, 2022
5309895
[google_chat_ros]remove dialogflow https server. instead, subscribe O…
mqcmd196 Jan 19, 2022
6a12150
[google_chat_ros]fix launch file for loading param and convert str ->…
mqcmd196 Jan 19, 2022
d8a7c5d
[google_chat_ros]add dependency
mqcmd196 Jan 20, 2022
14b4c2d
[google_chat_ros]support upload attachments to gdrive
mqcmd196 Jan 20, 2022
9a249f8
[google_chat_ros]fix google chat cards not shown correctly bugs
mqcmd196 Jan 21, 2022
0e13d5c
[google_chat_ros]add use_yaml arg
mqcmd196 Jan 21, 2022
54aa672
[google_chat_ros] add helper node of google chat ros, especially dial…
mqcmd196 Feb 20, 2022
b97f663
[google_chat_ros] add coding
mqcmd196 Feb 20, 2022
c7af28d
[google_chat_ros] set user_agent
mqcmd196 Feb 20, 2022
60a5a1f
[google_chat_ros] fix send message format in helper
mqcmd196 Feb 20, 2022
2f42faf
[google_chat_ros] add pub/sub library
mqcmd196 Apr 25, 2022
1f92748
[google_chat_ros] update README for current google_chat_ros packege T…
mqcmd196 May 3, 2022
59482ba
[google_chat_ros] support GCP Pub/Sub, drop Python2 support for parsi…
mqcmd196 May 3, 2022
7d03300
[google_chat_ros] remove unnecessary doc, change logging level of Pub…
mqcmd196 May 3, 2022
6920bcd
[google_chat_ros]README, add figures, fix typo
mqcmd196 May 3, 2022
15c6a0b
[google_chat_ros]remove unnecessary files
mqcmd196 May 3, 2022
5b95772
[google_chat_ros] Drop python2.x support, remove unnecessary msgs
mqcmd196 May 3, 2022
56b2155
[google_chat_ros] add rostest for python importing
mqcmd196 May 3, 2022
865232f
[dialogflow_task_executive] add actionlib, separate audio, text classes
mqcmd196 May 12, 2022
554e28c
[dialogflow_task_executive] fix class bug, python3 not available...
mqcmd196 May 12, 2022
fbb20f3
[dialogflow_task_executive] [dialogflow_ros] separate dialogflow clie…
mqcmd196 May 13, 2022
0665f9a
[dialogflow_task_executive]delete dialogflow pkg, merged into dialogf…
mqcmd196 May 16, 2022
d4d9de8
[dialogflow_task_executive]add actionlib server start
mqcmd196 May 17, 2022
5c00f76
[google_chat_ros]rename rosparam, function names related to dialogflow
mqcmd196 May 17, 2022
724a612
[google_chat_ros] handling shutting down httpd
mqcmd196 May 17, 2022
5302a43
[google_chat_ros]fix action names, space name in helper
mqcmd196 May 17, 2022
fc63570
[google_chat_ros] fix euslisp function
mqcmd196 May 18, 2022
9e448a7
[google_chat_ros] update eus functions
mqcmd196 May 21, 2022
3b919b7
[google_chat_ros] fix pubsub bug, killnode not defined
mqcmd196 May 21, 2022
3b68bef
[voicevox] Add get_cache_dir and check md5sum function
iory May 28, 2022
375509e
[voicevox] Enable cache
iory May 28, 2022
2daa09c
[voicevox] Set default cpu numthreads to 1
iory May 28, 2022
b225759
[google_chat_ros] drop dialogflow mode
mqcmd196 Jun 8, 2022
d855fa1
[google_chat_ros] fix action goal instance
mqcmd196 Jun 8, 2022
9b3cc5d
[google_chat_ros]recieving -> receiving
mqcmd196 Jun 8, 2022
af2f1c2
[dialogflow_task_executive] Fix bug; add error handling to around lau…
tkmtnt7000 Jun 7, 2022
5cd8291
[respeaker_ros] Publish audio_info
iory Jun 11, 2022
950ba8d
[respeaker_ros] Enable speech to text for multi channel.
iory Jun 11, 2022
dffe449
[respeaker_ros] Add audio_info arg in sample
iory Jun 11, 2022
227708e
[respeaker_ros] Add publish_multichannel option for publishing multi …
iory Jun 11, 2022
206aaaa
[respeaker_ros] Restore audio input to use argment's audio
iory Jun 12, 2022
c31b13c
Merge branch 'master' into respeaker
k-okada Jun 13, 2022
7f40f50
[respeaker_ros] Add publish_multichannel option to fix launch file er…
iory Jun 13, 2022
305343a
[respeaker_ros] Add roslaunch_add_file_check to test launch file format
iory Jun 13, 2022
296cc6a
[respeaker_ros] Set audio_info topic name and check length of it.
iory Jun 13, 2022
7d3e2c9
[respeaker_ros] Add comment for why we add publish_multichannel option.
iory Jun 13, 2022
4b7632b
[respeaker_ros] Remove publish_multichannel option and publish raw mu…
iory Jun 13, 2022
f872a10
[respeaker_ros] Publish spech_audio_raw
iory Jun 13, 2022
6e49927
[respeaker_ros] Add comment to know more defails
iory Jun 13, 2022
e8ae9fe
[respeaker_ros] Publish speech audio raw
iory Jun 13, 2022
92477a5
[respeaker_ros] Add parameters for respaker ros
iory Jun 13, 2022
8caae81
[respeaker_ros] Fixed publishing audio topic's namespace
iory Jun 13, 2022
383670f
[respeaker_ros] Add parameters for speech_to_text
iory Jun 13, 2022
89ba874
Merge remote-tracking branch 'iory/respeaker' into respeaker-multi-fe…
708yamaguchi Jun 14, 2022
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
50 changes: 35 additions & 15 deletions 3rdparty/voice_text/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,51 @@ else()
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
set(VT_LIB_PATH_OLD ${VT_ROOT}/bin/x86_32/RAMIO/libvt_jpn.so) # e.g., /usr/vt/sayaka/M16/bin/x86_32/RAMIO/libvt_jpn.so
set(VT_LIB_PATH_NEW ${VT_ROOT}/bin/LINUX32_GLIBC3/RAMIO/libvt_jpn.so) # e.g., /usr/vt/risa/H16/bin/LINUX32_GLIBC3/RAMIO/libvt_jpn.so
set(VT_LIB_PATH_FILEIO ${VT_ROOT}/bin/FILEIO/LINUX32_GLIBC3/libvt_jpn.so) # e.g., /usr/vt/hikari/D16/bin/FILEIO/LINUX32_GLIBC3/libvt_jpn.so
elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
set(VT_LIB_PATH_OLD ${VT_ROOT}/bin/x86_64/RAMIO/libvt_jpn.so) # e.g., /usr/vt/sayaka/M16/bin/x86_64/RAMIO/libvt_jpn.so
set(VT_LIB_PATH_NEW ${VT_ROOT}/bin/LINUX64_GLIBC3/RAMIO/libvt_jpn.so) # e.g., /usr/vt/risa/H16/bin/LINUX64_GLIBC3/RAMIO/libvt_jpn.so
set(VT_LIB_PATH_FILEIO ${VT_ROOT}/bin/FILEIO/LINUX64_GLIBC3/libvt_jpn.so) # e.g., /usr/vt/hikari/D16/bin/FILEIO/LINUX64_GLIBC3/libvt_jpn.so
endif()
if(EXISTS ${VT_LIB_PATH_OLD})
set(VT_LIB_PATH ${VT_LIB_PATH_OLD})
else()
if(EXISTS ${VT_LIB_PATH_NEW})
set(VT_LIB_PATH ${VT_LIB_PATH_NEW})
endif()
elseif(EXISTS ${VT_LIB_PATH_NEW})
set(VT_LIB_PATH ${VT_LIB_PATH_NEW})
elseif(EXISTS ${VT_LIB_PATH_FILEIO})
set(VT_LIB_PATH ${VT_LIB_PATH_FILEIO})
endif()
if(VT_LIB_PATH)
message(WARNING "VoiceText library is found at ${VT_LIB_PATH}")
message(WARNING "VoiceText Engine library is found at ${VT_LIB_PATH}")
else()
message(WARNING "VoiceText library is not found at ${VT_LIB_PATH_OLD} or ${VT_LIB_PATH_NEW}")
message(WARNING "VoiceText Engine library is not found at ${VT_LIB_PATH_OLD} or ${VT_LIB_PATH_NEW} or ${VT_LIB_PATH_FILE}")
endif()
endif()

# use traditional sdk or new api
set(VT_SDK_H ${VT_ROOT}/inc/vt_jpn.h)
set(VT_API_H ${VT_ROOT}/inc/vtapi.h)
if(EXISTS ${VT_SDK_H})
# use traditional sdk
message(WARNING "Using SDK because ${VT_SDK_H} was found.")
set(VT_INCLUDE ${VT_SDK_H})
elseif(EXISTS ${VT_API_H})
# use new api
message(WARNING "Using API because ${VT_SDK_H} was not found but ${VT_API_H} was found.")
string(REPLACE "/" ";" _VT_ROOT_SPLIT ${VT_ROOT})
list(GET _VT_ROOT_SPLIT 3 VT_SPEAKER)
list(GET _VT_ROOT_SPLIT 4 VT_TYPE)
set(VT_API_LIB_PATH ${VT_ROOT}/bin/libvtapi.so)
set(VT_INCLUDE ${VT_API_H})
endif()
configure_file(src/voice_text.cpp.in ${PROJECT_SOURCE_DIR}/src/voice_text.cpp)

include_directories(
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
add_executable(voice_text src/voice_text.cpp)
add_dependencies(voice_text ${PROJECT_NAME}_generate_messages_cpp ${PROJECT_NAME}_gencfg)
set_target_properties(voice_text PROPERTIES COMPILE_FLAGS -D_REENTRANT)
include_directories(
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
add_executable(voice_text src/voice_text.cpp)
add_dependencies(voice_text ${PROJECT_NAME}_generate_messages_cpp ${PROJECT_NAME}_gencfg)
set_target_properties(voice_text PROPERTIES COMPILE_FLAGS -D_REENTRANT)

if(NOT VT_LIB_PATH)
message(WARNING "Building dummy library")
Expand All @@ -64,10 +83,11 @@ if(NOT VT_LIB_PATH)
set(VT_LIB_PATH ${PROJECT_BINARY_DIR}/libvt_jpn.so)
endif()

target_link_libraries(voice_text
target_link_libraries(voice_text
${catkin_LIBRARIES}
${VT_LIB_PATH} -lm -lpthread
)
${VT_API_LIB_PATH} -lm -lpthread -ldl
)
if(NOT EXISTS ${VT_LIB_PATH})
add_dependencies(voice_text vt_dummy)
endif()
Expand Down
20 changes: 17 additions & 3 deletions 3rdparty/voice_text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,23 @@ ROS Interface for HOYA VoiceText Speech Synthesis Engine

## Installation

1. Install VoiceText SDK
2. Put license file
3. Build this package
### 1. Install VoiceText SDK
#### If you have voicetext sdk install binary, please follow the official guide and install both engine and SDK
#### If you don't have the sdk install binary but have voice text API binary, please follow the guide below.
1. Install VoiceText Engine by official guide
2. Copy VoiceText API binaries to VoiceText binary directory
VoiceText API package includes binary libraries and header file. You have to copy those of them to specific directory by executing following commands.
```bash
cd /path_to_api_package_directory # e.g. cd ~/Downloads/RS_VTAPI_SDK_Linux_4.3.0.2/20201113_VTAPI4.3.0.2_LINUX
cd bin/x64 # You have to cd x86 if your system is x86 architecture
# Assuming VoiceText engine's talker is hikari, type is D16. If it is different, please set appropriate directory.
sudo cp -a * /usr/vt/hikari/D16/bin # Don't forget to add -a not to break symbolic link.
cd ../../include/
sudo mkdir /usr/vt/hikari/D16/inc # not include, but inc
sudo cp vtapi.h /usr/vt/hikari/D16/inc
```
### 2. Put license file
### 3. Build this package

```bash
cd /path/to/catkin_workspace
Expand Down
3 changes: 2 additions & 1 deletion 3rdparty/voice_text/launch/voice_text.launch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

<arg name="sound_play_respawn" default="true" />

<node name="voice_text" pkg="voice_text" type="voice_text" output="screen"
<node name="voice_text" pkg="voice_text" type="voice_text"
output="screen" respawn="true" respawn_delay="10"
machine="$(arg voice_text_machine)">
<remap from="text_to_speech" to="voice_text/text_to_speech" />
<rosparam>
Expand Down
63 changes: 59 additions & 4 deletions 3rdparty/voice_text/src/voice_text.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#ifdef USE_DUMMY_INCLUDE
#include "dummy/vt_dummy.h"
#else
#include "@VT_ROOT@/inc/vt_jpn.h"
#include "@VT_INCLUDE@"
#endif

#define PATH_MAX 1024
Expand All @@ -45,7 +45,13 @@ public:

~VoiceText() {
if (initialized_) {
#ifdef _VTAPI_H_
VTAPI_ReleaseHandle(this->hVTAPI);
VTAPI_UnloadEngine(this->hEngine);
VTAPI_Exit();
#else
VT_UNLOADTTS_JPN(-1);
#endif
}
}

Expand All @@ -64,17 +70,37 @@ public:
license_path_char = (char*)calloc(std::strlen(license_path_.c_str())+1, sizeof(char));
std::strcpy(license_path_char, license_path_.c_str());
}
#ifdef _VTAPI_H_
VTAPI_Init("@VT_ROOT@/bin"); // set voice_text binary library path because it loads them dynamically
this->hVTAPI = VTAPI_CreateHandle();
if (this->hVTAPI == 0) {
ROS_ERROR("VoiceText API ERROR when creating API handler. : %s\n", VTAPI_GetLastErrorInfo(0)->szMsg);
return false;
}
VTAPI_SetLicenseFolder(license_path_char);
// Load engine
this->hEngine = VTAPI_GetEngine("@VT_SPEAKER@", "@VT_TYPE@");
ret = VTAPI_SetEngineHandle(this->hVTAPI, this->hEngine);
if(ret < VTAPI_SUCCESS){
ROS_ERROR("VoiceText API ERROR when creating engine handler. CODE: %d, MESSAGE: %s \n", ret, VTAPI_GetLastErrorInfo(this->hVTAPI)->szMsg);
return false;
}
#else
ret = VT_LOADTTS_JPN((int)NULL, -1, db_path_char, license_path_char);
free(db_path_char);
if (!license_path_.empty()) free(license_path_char);
if (ret != VT_LOADTTS_SUCCESS) {
ROS_FATAL("Failed to load TTS engine (code %d)", ret);
if (ret == -1) {
ROS_FATAL("You must install voice_text library before building this library");
}
return false;
}
VT_GetTTSInfo_JPN(VT_VERIFY_CODE, NULL, &ret, sizeof(int));
if (ret != 0) {
ROS_FATAL_STREAM("Verification failed (VT_VERIFY_CODE " << ret << ")");
return false;
}

// Print voice text info
char szTmp[PATH_MAX];
char szTmp2[PATH_MAX];
VT_GetTTSInfo_JPN(VT_BUILD_DATE, NULL, szTmp, PATH_MAX);
Expand All @@ -95,6 +121,10 @@ public:
VT_GetTTSInfo_JPN(VT_CODEPAGE, NULL, &ret, sizeof(int));
sprintf(szTmp2, "VT_GetTTSInfo_JPN(VT_CODEPAGE = %d\n", ret);
ROS_INFO_STREAM(szTmp2);
#endif

free(db_path_char);
if (!license_path_.empty()) free(license_path_char);

// advertise service
srv_ = nh_.advertiseService("text_to_speech", &VoiceText::text_to_speech, this);
Expand Down Expand Up @@ -124,6 +154,27 @@ public:
char* wave_char = (char*)calloc(std::strlen(req.wave_path.c_str())+1, sizeof(char));
std::strcpy(wave_char, req.wave_path.c_str());

#ifdef _VTAPI_H_
int ret;
// set attributes
VTAPI_SetAttr(this->hVTAPI, ATTR_PITCH, config_.pitch);
VTAPI_SetAttr(this->hVTAPI, ATTR_SPEED, config_.speed);
VTAPI_SetAttr(this->hVTAPI, ATTR_VOLUME, config_.volume);
VTAPI_SetAttr(this->hVTAPI, ATTR_PAUSE, config_.pause);
ret = VTAPI_SetOutputFile(this->hVTAPI, wave_char, FORMAT_16PCM_WAV);
if(ret != VTAPI_SUCCESS){
ROS_ERROR("VoiceText API ERROR when executing VTAPI_SetOutputFile. STATUS: %s\n", VTAPI_GetLastErrorInfo(this->hVTAPI)->szMsg);
res.ok = false;
}
// set input text file path
ret = VTAPI_TextToFile(this->hVTAPI, text_char, -1, TEXT_FORMAT_DEFAULT);
if(ret != VTAPI_SUCCESS){
ROS_ERROR("VoiceText API ERROR when executing VTAPI_TextToFile. STATUS: %s\n", VTAPI_GetLastErrorInfo(this->hVTAPI)->szMsg);
res.ok = false;
}
free(text_char);
free(wave_char);
#else
int ret = VT_TextToFile_JPN(VT_FILE_API_FMT_S16PCM_WAVE,
text_char,
wave_char,
Expand All @@ -138,12 +189,12 @@ public:

free(text_char);
free(wave_char);

if (ret != VT_FILE_API_SUCCESS) {
ROS_ERROR("Failed to execute tts: (code: %d)", ret);
res.ok = false;
return true;
}
#endif

res.ok = true;
return true;
Expand All @@ -156,6 +207,10 @@ public:
ros::ServiceServer srv_;
bool initialized_;
std::string db_path_, license_path_;
#ifdef _VTAPI_H_
VTAPI_HANDLE hVTAPI;
VTAPI_ENGINE_HANDLE hEngine;
#endif
};

int main(int argc, char** argv) {
Expand Down
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
Loading