-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add VOICEVOX (AI speech synthesis) package for ROS Interface #337
base: master
Are you sure you want to change the base?
Conversation
That's a fascinating node! I think this error is related to pypa/setuptools#1694, but I have not found the solution yet.....
|
What is the results of
|
After confirming setuptools version, I installed |
Sorry, I was wrong.
|
Almost same results as python3
|
What is the result of |
|
HRP2017で動作確認しました。今の所、問題なく使えそうです。 https://github.com/start-jsk/rtmros_hrp2/pull/607 |
this PR should remove type annotation lines. |
I tried to use voicevox with Ubuntu18.04 / Ros melodic, but I cannot build this package.
The error message was too long, so I uploaded at this gist. How should I do ? |
Hmm, I can build it in my Ubuntu 20.04 env. Let's check your PC |
@mqcmd196 I have same error even on 20.04. https://gist.github.com/k-okada/0e69cc55b261f914de5c430e1290772a |
Here is the
Build log It seems that the error occurs in Ubuntu 18.04 environment PC borrowed from @a-ichikura . I'm handling it. |
@mqcmd196 can you shere the output of
|
pip -V
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) ❯ pip list -v | grep local
absl-py 1.4.0 /usr/local/lib/python3.8/dist-packages pip
aiohttp 3.8.4 /home/obinata/.local/lib/python3.8/site-packages pip
aiosignal 1.3.1 /home/obinata/.local/lib/python3.8/site-packages pip
anyio 3.7.1 /home/obinata/.local/lib/python3.8/site-packages pip
async-timeout 4.0.2 /home/obinata/.local/lib/python3.8/site-packages pip
base-local-planner 1.17.3 /opt/ros/noetic/lib/python3/dist-packages
black 23.9.1 /usr/local/lib/python3.8/dist-packages pip
cachetools 5.2.0 /usr/local/lib/python3.8/dist-packages pip
chainer 7.8.1 /usr/local/lib/python3.8/dist-packages pip
click 8.1.7 /usr/local/lib/python3.8/dist-packages pip
cmake-language-server 0.1.6 /usr/local/lib/python3.8/dist-packages pip
datasets 2.14.5 /home/obinata/.local/lib/python3.8/site-packages pip
debugpy 1.8.0 /usr/local/lib/python3.8/dist-packages pip
dill 0.3.7 /home/obinata/.local/lib/python3.8/site-packages pip
distro 1.8.0 /home/obinata/.local/lib/python3.8/site-packages pip
dlib 19.24.0 /usr/local/lib/python3.8/dist-packages pip
exceptiongroup 1.2.0 /home/obinata/.local/lib/python3.8/site-packages pip
fcn 6.4.20 /usr/local/lib/python3.8/dist-packages pip
freezegun 1.2.1 /usr/local/lib/python3.8/dist-packages pip
frozenlist 1.3.3 /home/obinata/.local/lib/python3.8/site-packages pip
fsspec 2023.6.0 /home/obinata/.local/lib/python3.8/site-packages pip
fysom 2.1.6 /usr/local/lib/python3.8/dist-packages pip
gdown 4.5.1 /usr/local/lib/python3.8/dist-packages pip
google-api-core 2.8.2 /usr/local/lib/python3.8/dist-packages pip
google-api-python-client 2.55.0 /usr/local/lib/python3.8/dist-packages pip
google-auth 2.9.1 /usr/local/lib/python3.8/dist-packages pip
google-auth-httplib2 0.1.0 /usr/local/lib/python3.8/dist-packages pip
google-cloud-pubsub 2.13.4 /usr/local/lib/python3.8/dist-packages pip
google-cloud-texttospeech 2.12.0 /usr/local/lib/python3.8/dist-packages pip
googleapis-common-protos 1.56.4 /usr/local/lib/python3.8/dist-packages pip
grpc-google-iam-v1 0.12.4 /usr/local/lib/python3.8/dist-packages pip
grpcio 1.47.0 /usr/local/lib/python3.8/dist-packages pip
grpcio-status 1.47.0 /usr/local/lib/python3.8/dist-packages pip
h11 0.14.0 /home/obinata/.local/lib/python3.8/site-packages pip
httpcore 1.0.2 /home/obinata/.local/lib/python3.8/site-packages pip
httplib2 0.20.4 /usr/local/lib/python3.8/dist-packages pip
httpx 0.25.2 /home/obinata/.local/lib/python3.8/site-packages pip
huggingface-hub 0.17.2 /home/obinata/.local/lib/python3.8/site-packages pip
libpgm 1.3 /usr/local/lib/python3.8/dist-packages pip
multidict 6.0.4 /home/obinata/.local/lib/python3.8/site-packages pip
multiprocess 0.70.15 /home/obinata/.local/lib/python3.8/site-packages pip
mypy-extensions 1.0.0 /usr/local/lib/python3.8/dist-packages pip
nodeenv 1.7.0 /usr/local/lib/python3.8/dist-packages pip
oauth2client 4.1.3 /usr/local/lib/python3.8/dist-packages pip
openai 1.3.5 /home/obinata/.local/lib/python3.8/site-packages pip
packaging 23.1 /usr/local/lib/python3.8/dist-packages pip
pathspec 0.11.2 /usr/local/lib/python3.8/dist-packages pip
Pillow 9.2.0 /usr/local/lib/python3.8/dist-packages pip
pixel-ring 0.1.0 /usr/local/lib/python3.8/dist-packages pip
platformdirs 3.10.0 /usr/local/lib/python3.8/dist-packages pip
proto-plus 1.20.6 /usr/local/lib/python3.8/dist-packages pip
protobuf 3.20.1 /usr/local/lib/python3.8/dist-packages pip
pyarrow 13.0.0 /home/obinata/.local/lib/python3.8/site-packages pip
pydantic 1.10.5 /usr/local/lib/python3.8/dist-packages pip
PyDrive 1.3.1 /usr/local/lib/python3.8/dist-packages pip
pygithub3 0.5.1 /usr/local/lib/python3.8/dist-packages pip
pygls 0.12.4 /usr/local/lib/python3.8/dist-packages pip
pyright 1.1.294 /usr/local/lib/python3.8/dist-packages pip
PySocks 1.7.1 /usr/local/lib/python3.8/dist-packages pip
pytesseract 0.3.9 /usr/local/lib/python3.8/dist-packages pip
pyusb 1.2.1 /usr/local/lib/python3.8/dist-packages pip
rsa 4.9 /usr/local/lib/python3.8/dist-packages pip
slacker 0.13.0 /usr/local/lib/python3.8/dist-packages pip
slacker-cli 0.4.2 /usr/local/lib/python3.8/dist-packages pip
sniffio 1.3.0 /home/obinata/.local/lib/python3.8/site-packages pip
SpeechRecognition 3.8.1 /usr/local/lib/python3.8/dist-packages pip
spidev 3.5 /usr/local/lib/python3.8/dist-packages pip
tabulate 0.8.10 /usr/local/lib/python3.8/dist-packages pip
tomli 2.0.1 /usr/local/lib/python3.8/dist-packages pip
tqdm 4.64.0 /usr/local/lib/python3.8/dist-packages pip
typeguard 2.13.3 /usr/local/lib/python3.8/dist-packages pip
typing-extensions 4.8.0 /home/obinata/.local/lib/python3.8/site-packages pip
uritemplate 4.1.1 /usr/local/lib/python3.8/dist-packages pip
webrtcvad 2.0.10 /usr/local/lib/python3.8/dist-packages pip
xxhash 3.3.0 /home/obinata/.local/lib/python3.8/site-packages pip
yarl 1.9.2 /home/obinata/.local/lib/python3.8/site-packages pip
|
how about
|
|
@k-okada @iory I succeeded the build in both @a-ichikura 's melodic environment and my noetic environment |
@k-okada @a-ichikura NOTE: the voicevox doesn't execute correctly in latest |
[VOICEVOX] Upgrade pyopenjtalk and lock versions in requirements
I launch voicevox_texttospeech.launch with setting
From this messages, I understand sound_play node is working and I can see
However, I got error messages which says soundplay_node.py is not working.
The content of the python file is just simple example.
How can I solve it? |
I encountered same problem. Adding sleep worked well like #!/usr/bin/env python3
import rospy
from sound_play.libsoundplay import SoundClient
rospy.init_node("say_node")
client = SoundClient(sound_action='robotsound_jp', sound_topic='robotsound_jp')
rospy.sleep(2)
client.say('こんにちは', voice='四国めたん-あまあま') is it |
Or, you can use actionlib version
|
btw, I encounter these error both my desktop and laptop environment when the sound play request has been sent
|
this is a common issue for ros publisher. |
Thank you for your info. I didn't know that.
I could execute it because I wrote Python code on IPython.
2024年5月12日(日) 8:38 Shingo Kitagawa ***@***.***>:
… @mqcmd196 <https://github.com/mqcmd196>
#337 (comment)
<#337 (comment)>
this is a common issue for ros publisher.
after publisher initialization, we need to wait a bit to be ready for
publishing.
—
Reply to this email directly, view it on GitHub
<#337 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGUARFBBZMI24PBSMQV26ATZB2TXRAVCNFSM5TUCAA22U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJQGYYDKOBUHE4A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
===========================================
Yoshiki Obinata
The University of Tokyo
Graduate School of Information Science and Technology
Department of Mechano Informatics
2nd grade Ph.D course student
JSK Robotics Laboratory
===========================================
|
Thank you for the information.
|
How about using `blocking=True` as @k-okada 's advice? I think it is better
for actual use.
2024年5月13日(月) 15:58 Aiko Ichikura ***@***.***>:
… @knorth55 <https://github.com/knorth55> @mqcmd196
<https://github.com/mqcmd196>
Thank you for the information.
I succeeded in speaking the voice with 5 second sleep.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import rospy
import time
from sound_play.libsoundplay import SoundClient
rospy.init_node('say_node')
client = SoundClient(sound_action='robotsound_jp', sound_topic='robotsound_jp')
time.sleep(5)
client.say('こんにちは', voice='四国めたん-あまあま')
—
Reply to this email directly, view it on GitHub
<#337 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGUARFBX2V5Q5MNU5ZVBVADZCBQCZAVCNFSM5TUCAA22U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJQGY3TSNBZHE4Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
===========================================
Yoshiki Obinata
The University of Tokyo
Graduate School of Information Science and Technology
Department of Mechano Informatics
2nd grade Ph.D course student
JSK Robotics Laboratory
===========================================
|
This method is also useful. |
How can I merge
The node is working well,
However, the topic data doesn't change(false to true) even thought the sound is playing. |
…rver This commit introduces a new utility function `convert_to_float` that recursively converts numpy.float32 values to Python's native float type. This change is necessary because numpy.float32 values are not serializable by Python's json library, which causes issues when these values need to be sent as JSON responses from the voicevox server. The `convert_to_float` function is now applied to `accent_phrases` after they are generated by the engine, ensuring that all numeric values are in a format compatible with JSON serialization standards. This update ensures that the server can handle serialization of voice properties without encountering errors due to data type compatibility issues with JSON.
It seems that your launch file is functioning correctly. Have you tried using simple version
|
voicevox
ROS Interface for VOICEVOX (AI speech synthesis)
TERM
VOICEVOX is basically free to use, but please check the terms of use below.
TERM
Each voice synthesis character has its own rules. Please use this package according to those terms.
Installation
Build this package.
cd /path/to/catkin_workspace catkin build voicevox
Usage
Launch sound_play with VOICEVOX Text-to-Speech
Say something
For python users
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.
For roseus users
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
andVOICEVOX_TEXTTOSPEECH_PORT
.You can also set the default character by setting
VOICEVOX_DEFAULT_SPEAKER_ID
.Please refer to here for the speaker id.