Speech messages and ros software for Vizzy
(Graphics designed by Hugo Simão)
This package is already loaded with the main launcher. The web interface's link is bookmarked on Vizzy's laptop.
- You need to setup a google cloud account. Follow the steps in: https://cloud.google.com/text-to-speech/docs/before-you-begin
- Put the credentials file in the "vizzy_speech/vizzy_speech_servers/credentials" folder and call it "google.json"
- Change the IP address to the one of your roscore in . If you are making tests locally you can just use the localhost (127.0.0.1).
- Launch a simplified launcher with just the action server and rosbridge_websocket:
roslaunch vizzy_speech_servers liteWozSystem.launch
- Open the vizzy_web_oz/index.html file on your browser. We tested this on Google Chrome and the Brave Browser.
Edit the files in vizzy_speech/vizzy_web_woz/js/lang_xx.js
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import rospy
# Brings in the SimpleActionClient
import actionlib
import woz_dialog_msgs.msg
def test_action():
client = actionlib.SimpleActionClient('gcloud_tts', woz_dialog_msgs.msg.SpeechAction)
client.wait_for_server()
goal = woz_dialog_msgs.msg.SpeechGoal(language="pt_PT", voice="pt-PT-Wavenet-D", message="Olá boa tarde", speed=2)
client.send_goal(goal)
client.wait_for_result()
return client.get_result()
if __name__ == '__main__':
try:
# Initializes a rospy node so that the SimpleActionClient can
# publish and subscribe over ROS.
rospy.init_node('speech_gcloud_client_py')
result = test_action()
print("Result:", result.success)
except rospy.ROSInterruptException:
print("program interrupted before completion", file=sys.stderr)