speak text app gui [debian, ubuntu]

this tutorial is still working but you can find a more easy setup at:
https://github.com/freddii/offline-text2speek-gui

install the text2speech engine:
sudo apt-get install libttspico-utils -y

create a Gui script:
touch ~/.speak_text.sh
chmod +x ~/.speak_text.sh
nano ~/.speak_text.sh

#!/bin/bash
#speak text
OUTPUT=$(zenity --entry --entry-text="Hallo" --title="speak_text_app" --text="Schreibe deinen Text den du vorlesen lassen willst")
echo $OUTPUT
pico2wave --lang=de-DE --wave=/tmp/speak.wav "$OUTPUT" && aplay /tmp/speak.wav && rm /tmp/speak.wav

create starter:
get an icon:
mkdir ‐p ~/.local/share/icons/
cd ~/.local/share/icons/
wget https://raw.githubusercontent.com/encharm/Font-Awesome-SVG-PNG/master/black/svg/bullhorn.svg

cd ~/.local/share/applications
nano speak_text_app.desktop

[Desktop Entry]
Name=speak_text_app
Comment=speak text app
Exec=/home/xxUserxx/.speak_text.sh
Icon=/home/xxUserxx/.local/share/icons/bullhorn.svg
Terminal=false
Type=Application
Categories=System;Utility;Application;

use the correct username in starter:
cd ~/.local/share/applications
sed -i 's/xxUserxx/'$USER'/' speak_text_app.desktop

if you like to redirect the output to mic you can use:
sudo apt-get install pavucontrol

others:
http://ttssamples.syntheticspeech.de/deutsch/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s