text2speech german

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

text2speech german

#1 Post by MU »

Download (11 MB):
http://dotpups.de/dotpups/Science/txt2speech-german.pup

Then open a console-window, and type:
say "Dieser Synthesizer ist durchaus zum vorlesen längerer Texte geeignet. Er kann auch zählen. 3,14 ist Pi."

Or:
say "inglish sounds olmost as woers as spoken by a riel german" :lol:


To set the speed, type:
sayspeed 10000

Try values between 10000 and 20000.
To set the default (15000) just type
sayspeed

It uses aplay (alsa) for playing, to change that, you would have to modify
/usr/local/bin/txt2speech.sh

I created the dotpup using these instructions:
http://www.linuxwiki.de/SprachAusgabe

Mark
Last edited by MU on Mon 14 Jul 2008, 10:50, edited 1 time in total.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

uploaded again, the speedsetting did not work.
Mark

vabene06
Posts: 36
Joined: Tue 25 Apr 2006, 20:31

#3 Post by vabene06 »

It is nice.
Ist es m

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#4 Post by MU »

yes, to read a longer textfile, run such a command:

say "`cat /etc/puppyversion`"

But it is difficult to understand, because it sounds very monotone.

you could use such a shellscript:

saytext

Code: Select all

#!/bin/bash

say "`cat $1`"
Then you can use it like say:
saytext /etc/puppyversion

It might be worth a try, to test other voices.
Download one of those mentioned here:
http://www.linuxwiki.de/SprachAusgabe

Extract to
/usr/local/txt2speech
Then you should have a new subfolder there like "de2".

To use it instead of de1, edit this line in /usr/local/bin/txt2speech.sh:
VOICE=de1
Set it to
VOICE=de2

Mark

vabene06
Posts: 36
Joined: Tue 25 Apr 2006, 20:31

#5 Post by vabene06 »

Thanx, it works fine.
vabene

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#6 Post by MU »

here, this is much better:

save it as /usr/local/bin/talktext1

Then make it executable:
chmod 755 /usr/local/bin/talktext1

Code: Select all

#!/usr/bin/puppybasic
include "/usr/lib/wxbasicscript/basefunctions.inc"

say = "say"


thefile = argvtostring()

if left(thefile,3) = "-en" then
  say = "talk"
  thefile = cutleft(thefile , "-en ")
end if



t = readfiletolist(thefile)

for i = 0 to count(t)-1

  t[i] = replace(t[i],"\"" , "\\\"")

  t[i] = replace(t[i],". " , ". . . . ")
  t[i] = replace(t[i],"! " , "! . . . ")
  t[i] = replace(t[i],"? " , "? . . . ")

next

writelisttofile("/tmp/talktext.tmp" , t)
shell(say & " \"`cat /tmp/talktext.tmp`\"")
removefile("/tmp/talktext.tmp")

Then save this text as "/root/test.txt":
US-Außenministerin Rice hat Äußerungen der iranischen Regierung über den Vermittlungsvorschlag im Atomstreit begrüßt. Der Optimismus von Deutschlands Außenminister Steinmeier hält sich indes in Grenzen.
important save it as ISO-8859-1, not as UTF-8 :!:
There is a small selection for that in the "save as" dialog of leafpad.

Then run:
talktext1 /root/test.txt

Now you really can understand what she says!
Ok, maybe you must listen twice. But it is much better than before, because now you have a pause between each sentence. And you can use Texts, that contain the "-sign, too.

To test it with the english festival:
Use an english text, then run
talktext1 -en /root/test.txt

But that is much more difficult to understand than german. Maybe some more tweaking achieves better results.

Mark
Last edited by MU on Mon 14 Jul 2008, 01:53, edited 1 time in total.

vabene06
Posts: 36
Joined: Tue 25 Apr 2006, 20:31

#7 Post by vabene06 »

It is ok. It works fine . thanx, vabene

Post Reply