Skip to content

nowittyusername/est_voice_synth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EKI kõnesüntesaatori intalleerimise juhend ROSile

English instructions below

Antud juhend on loodud EKI kõnesüntesaatori kasutamiseks ROSis, kasutades Tartu Ülikooli Robootika projekti raames loodud ROSi wrapperit ja soundplay paketti. Wrapper on loodud töötama ROS Kinetic Kame versioonil.

Juhend kasutamiseks:

  1. Klooni EstROSi kaust https://github.com/ut-ims-robotics/EstROS oma catkin lähtekoodi kausta.
cd catkin_ws/src
git clone https://github.com/ut-ims-robotics/est_voice_synth.git
  1. Muuda .wav failide loomise asukohta oma failisüsteemis, tuleb anda absoluutne failitee. Selleks muuda src kaustas olevas estonian_text2speech.cpp failis parameetreid:
size_t seconds = ess->convertTextToWave (text, "/abs_path_to_gen_wav/est_synth.wav");
sc->playWaveFromPkg("sound_play", "/abs_path_to_gen_wav/est_synth.wav");
  1. Klooni synthts_et-master koodihoidla Githubist kusagile oma arvutisse.
cd ~
git clone https://github.com/ut-ims-robotics/synthts_et-master.git
  1. Kopeeri kloonitud synthts_et-master koodihoidlast kaust nimega dct oma catkin tööruumi peakausta (catkin_ws)

  2. Installeeri Audio common ROS pakett.

sudo apt-get install ros-<distro>-audio-common
  1. Mine oma catkin tööruumi peakausta ja käivita catkin_make käsk:
cd catkin_ws
catkin_make
  1. Programmi saab testida jooksutades käsku roslaunch. Kui see ei tööta proovi sõlmi individuaalset käivitada kasutades rosrun käsku.
source devel/setup.bash
roslaunch est_voice_synth est_voice_synth.launch 
  1. Nüüd ootab sõlm nimega estonian_text2speech teema all nimega /estonian_voice sõne, mida .wav failiks sünteesida. Kõige kiiremini saab testida sõlme korrektset tööd väljastades vastavale teemale sõne ning kuulata valminud .wavfaili.
rostopic pub /estonian_voice "Sünteesi jutumärkides olev tekst"
  1. (VALIKULINE) Kui soovid jooksutada pikemaid .wav faile kui 10 sekundit, siis tuleks kõrvaldada üks levinud probleem soundplay_node.py failis. See peaks asuma asukohas /opt/ros/kinetic/lib/sound_play/soundplay_node.py, kuid selle leidmiseks võib ka kasutada käsku sudo find / -name soundplay_node.py
def get_staleness(self):
.....
position = self.sound.query_position(Gst.Format.TIME)[1] # Muuda siin 0 üheks nagu näidatud
duration = self.sound.query_duration(Gst.Format.TIME)[1] # Muuda siin 0 üheks nagu näidatud 
......

Institute of the Estonian Language (EKI) speech synthesizer installation guide for ROS

This installation guide is meant to help you use the EKI speech synthesizer on the ROS operation system using the soundplay package. It was created during the course called Robotics Engineering Project in University of Tartu. The current wrapper is designed to work on ROS Kinetic Kame.

Installation guide:

  1. Clone the EstROS folder https://github.com/ut-ims-robotics/EstROS into your catkins_ws src folder.
cd catkin_ws/src
git clone https://github.com/ut-ims-robotics/est_voice_synth.git
  1. Change the location for the generated .wav files according to your file system, you need to give the absolute path. You need to change some parameters in the estonian_text2speech.cpp file in located your src folder:
size_t seconds = ess->convertTextToWave (text, "/abs_path_to_gen_wav/est_synth.wav");
sc->playWaveFromPkg("sound_play", "/abs_path_to_gen_wav/est_synth.wav");
  1. Clone synthts_et-master repository from Githubist to somewhere in your computer.
cd ~
git clone https://github.com/ut-ims-robotics/synthts_et-master.git
  1. Copy a folder called dct from the cloned synthts_et-master repository into your workspace's main folder (catkin_ws)

  2. Install the Audio common ROS package.

sudo apt-get install ros-<distro>-audio-common
  1. Got to your catkin_ws folder and execute the catkin_make command:
cd catkin_ws
catkin_make
  1. You can test the program using the roslaunch command. If that doesn't you can try running each node individually using the rosrun command.
source devel/setup.bash
roslaunch est_voice_synth est_voice_synth.launch 
  1. The estonian_text2speech node is now waiting for string data under the /estonian_voice topic and generates a .wav accordingly. The easiest way to check if everything is working properly is to manually publsih a string to that topic and listen to the generated .wav file.
rostopic pub /estonian_voice "turn this string into sound"
  1. (OPTIONAL) If you wish to play a .wav that is longer than 10 seconds then you need fix a common bug within the soundplay_node.py file. The node should be located in at /opt/ros/kinetic/lib/sound_play/soundplay_node.py However you can also use the following command to find it sudo find / -name soundplay_node.py
def get_staleness(self):
.....
position = self.sound.query_position(Gst.Format.TIME)[1] # Chnage this from 0 to 1
duration = self.sound.query_duration(Gst.Format.TIME)[1] # Chnage this from 0 to 1 
......

About

Estonian Speech Synthesizer on ROS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 80.7%
  • CMake 19.3%