Notices


Reply
Thread Tools
Posts: 8 | Thanked: 7 times | Joined on Jan 2010 @ Germany
#1
Hello folks,

i was so excited by the app eSpeakTime that i made a german localization. I edited the file /usr/bin/espeaktime-now.sh by adding the following lines:

Code:
if [ $(echo $LC_MESSAGES) == "de_DE" ]; then
espeak -vde -w $fname $(date "+%H:Uhr:$(echo %M|sed 's/0*//')")
else
espeak -w $fname $(date "+%H:%M")
fi
This changes the espeak language to german, adds the word "Uhr" and cuts the leading zeros in the Minutes. I hope it makes it a bit more human understandable.

I also attached the complete file (don't forget to rename if from .txt to .sh)
Attached Files
File Type: txt espeaktime-now.txt (331 Bytes, 147 views)
 

The Following 2 Users Say Thank You to trurl For This Useful Post:
Posts: 29 | Thanked: 7 times | Joined on May 2010 @ Frankfurt, Germany
#2
Just a quick hint: You can get the minutes with the leading 0s stripped using '%-M'.
 

The Following 2 Users Say Thank You to Manul For This Useful Post:
Posts: 8 | Thanked: 7 times | Joined on Jan 2010 @ Germany
#3
Originally Posted by Manul View Post
Just a quick hint: You can get the minutes with the leading 0s stripped using '%-M'.

Thanks for that, good point. So now it will look like this:

Code:
if [ $(echo $LC_MESSAGES) == "de_DE" ]; then
espeak -vde -w $fname $(date "+%-H:Uhr:%-M")
else
espeak -w $fname $(date "+%H:%M")
fi
Now it will cut the leading zeros in the hours too.

Last edited by trurl; 2010-06-20 at 12:59.
 

The Following User Says Thank You to trurl For This Useful Post:
CutterSlade's Avatar
Posts: 64 | Thanked: 16 times | Joined on Apr 2010 @ Germany, near Hamburg
#4
I always wanted such a feature for my cellphones! Is it possible to change the voice (volume,pitch, etc) with that file?
Also it would be great if the media player would be paused while espeak is speaking.

Last edited by CutterSlade; 2010-06-20 at 16:00.
 
Posts: 384 | Thanked: 95 times | Joined on Jan 2010 @ Romania
#5
Hi! could anyone be kind to write the commands for xterm for copying the espeaktime-now.sh from /usr/bin/espeaktime-now.sh to /home/user/MyDocs? Thank you!
 
Posts: 384 | Thanked: 95 times | Joined on Jan 2010 @ Romania
#6
I assume that for romanian this sequence: if [ $(echo $LC_MESSAGES) == "de_DE" will be f [ $(echo $LC_MESSAGES) == "ro_RO". Wright?
 
Posts: 4,556 | Thanked: 1,624 times | Joined on Dec 2007
#7
Originally Posted by puiradu View Post
Hi! could anyone be kind to write the commands for xterm for copying the espeaktime-now.sh from /usr/bin/espeaktime-now.sh to /home/user/MyDocs? Thank you!
To copy in Linux. Use the command cp.

The way cp works is:

cp folder/file you want to copy destination (and note if it has spaces in the filename you will need to surround it with quotation marks like "Program Files" TARGET

So for what you asked for it would be..

Code:
cp /usr/bin/espeaktime-now.sh /home/user/MyDocs
Where the first part following cp is the file you wanted to copy, with the /home/user/MyDocs/ being the directory you want to copy them too.

Hint you can press tab to have xterm auto complete paths for you. So instead of typing out espeak time, you can type in esp and press tab to get the rest.
__________________
Originally Posted by ysss View Post
They're maemo and MeeGo...

"Meamo!" sounds like what Zorro would say to catherine zeta jones... after she slaps him for looking at her dirtily...
 

The Following User Says Thank You to Laughing Man For This Useful Post:
Posts: 384 | Thanked: 95 times | Joined on Jan 2010 @ Romania
#8
i still don't get it. i renamed the atached file to espeaktime-now.sh and i used the command cp /home/user/MyDocs/espeaktime-now.sh /usr/bin/ to copy it to the location and the hour is still played in english.

i tryed another method: i deleted the file espeaktime-now.sh from /usr/bin and added the new one and the result is that the hour is not played at all.

what I did wrong? how to make this work?
 
Posts: 8 | Thanked: 7 times | Joined on Jan 2010 @ Germany
#9
Originally Posted by puiradu View Post
i still don't get it. i renamed the atached file to espeaktime-now.sh and i used the command cp /home/user/MyDocs/espeaktime-now.sh /usr/bin/ to copy it to the location and the hour is still played in english.

i tryed another method: i deleted the file espeaktime-now.sh from /usr/bin and added the new one and the result is that the hour is not played at all.

what I did wrong? how to make this work?
Hmm... make sure you copy it as root.

i'dont know if ro_RO is right. To find that out type "echo $LC_MESSAGES" into xterm.
 

The Following User Says Thank You to trurl For This Useful Post:
Posts: 384 | Thanked: 95 times | Joined on Jan 2010 @ Romania
#10
i get it now. this depends to the phone language not to espeak languages! i guess the file made by trurl works only if the language of the phone is set to german!

unfortunately there isn't romanian localization for maemo. I ofer myself to make the translation but I don't know how or what programs to use. Anyone? who can help me to make romanian localiation for n900? any skilled developers?

Last edited by puiradu; 2010-06-20 at 18:27.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 06:27.