Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 23 Aug 2014, 15:29
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Clipboard tools and Hotkeys for jwm
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [21 Posts]   Goto page: 1, 2 Next
Author Message
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Sun 22 Nov 2009, 19:13    Post subject:  Clipboard tools and Hotkeys for jwm
Subject description: Thesaurus, Google and Text to Speech
 

You can now use the contents of your clipboard to:
    google (Alt+s) - requires seamonkey
    thesaurus (Alt+t) - requires gaiksaurus
    t2s(Alt+l) - requires seamonkey

I recommend setting seamonkey to play .wav with /usr/bin/aplay
You can access them from all the command line as well

I will add some of the stuff from 4.2 in the next one, but these are new AFAIK

I went through some effort to figure out how to add the keybindings without removing any that you have installed (using sed in the pinstall.sh script)

I'm sure that these will interfere in some way with some program... just change your window focus (click on a different window or the desktop) for instance - trying to use the thesaurus in Seamonkey will bring up the "Tool" Menu. Simply minimizing the window will allow you to bring up the thesaurus for your clipboard contents

Edit: To change the keybindings
Code:
defaulttexteditor /root/.jwm/jwmrc-personal
hotkeys-0.1.pet
Description  with guis added
pet

 Download 
Filename  hotkeys-0.1.pet 
Filesize  1.05 KB 
Downloaded  376 Time(s) 
hotkeys-0.0.pet
Description 
pet

 Download 
Filename  hotkeys-0.0.pet 
Filesize  990 Bytes 
Downloaded  319 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101

Last edited by technosaurus on Mon 23 Nov 2009, 03:26; edited 1 time in total
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2306
Location: New Zealand

PostPosted: Mon 23 Nov 2009, 02:03    Post subject: Re: Clipboard tools and Hotkeys for jwm
Subject description: Thesaurus, Google and Text to Speech
 

technosaurus wrote:
trying to use the thesaurus in Seamonkey will bring up the "Tool" Menu.[/code]


Actually, it didn't; using Puppy 4.3.1 with its default Seamonkey 1.1.18, highlighting some text and then pressing Alt-t brought up gaiksaurus. Excellent! I didn't use your dotpet though, since I had already installed the appropriate "thesaurus" script based on the code you published in another related thread:

http://www.murga-linux.com/puppy/viewtopic.php?p=364218&search_id=1329169398#364218

I'm using both gaiksaurus and Artha (like wordweb) http://www.murga-linux.com/puppy/viewtopic.php?p=361204&search_id=1329169398#361204 (which includes dictionary functionality): the combination of both is extremely powerful (gaiksaurus provides lots of thesaurus synonyms) and Artha, lots of other detail about words, their meanings, and their relationships generally. Artha's hotkey is Ctrl-Alt-w and, once installed via sikpuppy's dotpet, is first started from JWM Menu -> Documents category (after that it sits as an icon next to volume control and clock; like wordweb in windows).

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2306
Location: New Zealand

PostPosted: Mon 23 Nov 2009, 02:23    Post subject: Festival TTS online version  

I've now installed your dotpet.

In Seamonkey 1.1.18 preferences, Helper Applications, I set mime type audio/x-wav to Open With /usr/bin/aplay. I must say that I am impressed with Festival's online Text-To-Speech synthesiser quality, though I had a longish wait being only on dialup. Apparently, the Festival website will only allow a maximum of seventy characters at a time though.

I should probably consider upgrading foksyfeyer to use this new Festival speech engine (a downloaded offline version) instead of espeak.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Mon 23 Nov 2009, 02:40    Post subject:  

The 70 character limit does not apply to my hack.
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2306
Location: New Zealand

PostPosted: Mon 23 Nov 2009, 03:00    Post subject: demo purposes only  

For some reason only short highlighted clips would play for me.

I also wonder if you noticed the note on the bottom of Festival's webpage:

Quote:

(NOTE: This page is provided for demonstration purposes only. Direct use of the CGI synthesis interface is not permitted (computer resources reserved for this demo are limited).


I don't think it would be good to bypass that; they do offer the software free now after all. Wouldn't want them to get stroppy! :-)

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Mon 23 Nov 2009, 03:24    Post subject:  

Thanks for the heads up on that. I'll probably remove the text2speech portion then. I had just made a gui for it too.
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
jakfish

Joined: 18 Jul 2008
Posts: 756

PostPosted: Mon 23 Nov 2009, 06:18    Post subject:  

Works very well for bringing up the copied word in the thesaurus. Execpt in wine/word 97. alt-t will bring up an empty thesaurus--no big deal since word is already in clipboard, so just keystroke alt-v, enter

Odd, though, the wine/word 97 thing. For instance, a user can copy word 97 text and paste into bonafide linux apps. Don't know why xclip won't drop the cntl-c-ed word into thesaurus. But as I said, the solution is nothing more than two keystrokes.

Thanks for your good ideas,
Jake
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2306
Location: New Zealand

PostPosted: Mon 23 Nov 2009, 16:22    Post subject: use a non-restrictive online synthesiser or use espeak  

A couple of alternatives for the voice part (looking forwards to your GUI!):

I had a look at an alternative online voice synthesis demo site: www.festvox.org. Though the synthesis quality isn't so good using that source, there didn't seem to be any forced restrictions on usage. So for your /usr/bin/t2s script I used the following code instead:

Code:

#!/bin/sh
if [ ! $1 ];then
MYWORD=`xclip -o`
else
MYWORD=$@
fi
seamonkey -remote "openurl(http://www.festvox.org/cgi-bin/gen_fest.wav?format=wav&voice=slt_arctic_cg (American Female)&text=$MYWORD,NEW-TAB)"


Festvox possibly won't really like people accessing their online demo via cgi, but they don't appear to say so (hence no legal ramifications or at least less likelihood of being locked out by the serving site).

Actually, I still prefer an offline solution and would suggest simply installing espeak for clipboard reading in conjunction with your hotkey script. The espeak dotpet download isn't large (approx 600 kB) and it consumes relatively few resources in operation. [I realise nevertheless that you have your eyes on something of almost zero size to include in Puppy 4.4, but espeak could be left as an add on option perhaps? - actually, I think espeak is so useful for accessibility reasons that it is small enough that it should be considered for inclusion in default puppy downloads, especially with your hotkey popup idea, but it is easy enough to install as a dotpet I suppose...] For example, I am now using this for your t2s script:

Code:

#!/bin/sh
if [ ! $1 ];then
MYWORD=`xclip -o`
else
MYWORD=$@
fi
echo $MYWORD | espeak


You need to have espeak installed of course. Since I have foksyfeyer installed on my system
http://www.murga-linux.com/puppy/viewtopic.php?p=364717#364717
, I already have espeak, but if you want to avoid the 3.5 MB download of foksy, you could just install muggins' small espeak dotpet (along with the needed portaudio dotpet), which you can get from here:

http://www.murga-linux.com/puppy/viewtopic.php?p=164158#164158

[EDIT: the above espeak pet is newer than the one muggins produced for the navsat app (in another thread) afterall]

Espeak may not sound quite so nice or natural as the best online Festival voices since by default it uses a small voice sample, but for me it is the best compromise solution in terms of functionality and resource usage for this simple clipboard reader application.

What added functionality did you have planned for the GUI you had in mind? Looking forwards to seeing that since this thesaurus/voice etc popup is a great addition to Puppy.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2306
Location: New Zealand

PostPosted: Mon 23 Nov 2009, 18:29    Post subject: espeak with mbrola voices  

A wee bit better than the default supplied espeak "voice" is to use espeak along with mbrola. Unfortunately the typical "small" mbrola voice is around 5MB to download, but I find it worthwhile to my ears!

Here is an extract from the espeak website http://espeak.sourceforge.net/mbrola.html on how to install mbrola:

Quote:

# To install the Linux Mbrola binary, download: http://www.tcts.fpms.ac.be/synthesis/mbrola/bin/pclinux/mbr301h.zip. Unpack the archive, and copy and rename the file: mbrola-linux-i386 to mbrola somewhere in your executable path (eg. /usr/bin/mbrola ).

# Get the en1 voice from: http://www.tcts.fpms.ac.be/synthesis/mbrola/mbrcopybin.html. Unpack the archive, and copy the "en1" data file (not the whole "en1" directory) somewhere convenient (eg. /usr/share/mbrola/en1 ).


You can then modify your t2s script to use espeak with the downloaded mbrola voice (example is for English male mb-en1) as follows:

Code:

#!/bin/sh
if [ ! $1 ];then
MYWORD=`xclip -o`
else
MYWORD=$@
fi
echo $MYWORD | espeak -v mb-en1 | mbrola -e /usr/share/mbrola/en1 - - | aplay -r16000 -fS16


Still nothing like as clear as the Festival online TTS demo though...

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Mon 23 Nov 2009, 19:37    Post subject:  

I actually compiled espeak without any extra libraries but then it will only output wav files (the whole package was ~100k once I stripped it down) I can compile it against portaudio statically to save some size if you need direct audio output, and have no other need for portaudio. It could save anywhere between 10 and 90 percent of the size of the portaudio libs and is usually faster with a smaller memory footprint.
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2306
Location: New Zealand

PostPosted: Mon 23 Nov 2009, 19:58    Post subject: espeak and festival and  

I think one of the reasons muggins espeak dotpet is so big is that it includes the various "voices" espeak provides, not just the default one; also the dictionaries for the different languages. However, I'd be interested to see the size of and try the statically compiled portaudio one you suggest (but libportaudio.so only takes up about 135kb total installed on my system).

As far as best, non-commercial, non-huge, speak quality is concerned, it seems that the Festival in conjunction with one of the the enhanced Nitech HTS voices would be the way to go. Not a tiny download to get good voice but I think it comes in at well under 10 MB for Festival and the Nitech HTS voices (once a lot of unneeded stuff is removed from the Festival download stuff, I imagine...). Still won't be as good as the Festival online demo of course, but might be quite good. What I would really like, therefore, is a dotpet for the latest Festival... :-)

The Nitech HTS voices for Festival can be downloaded from here:

http://hts.sp.nitech.ac.jp/?Download#z142d16f

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Tue 24 Nov 2009, 01:56    Post subject:  

I made espeak (actually only speak) as an app dir (every thing in the same directory) which will play really nicely with ROX. It is statically compiled against portaudio so no dependencies required.
just expand the tarball to /usr/local/apps
espeak.tar.gz
Description 
gz

 Download 
Filename  espeak.tar.gz 
Filesize  404 KB 
Downloaded  315 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2306
Location: New Zealand

PostPosted: Tue 24 Nov 2009, 02:53    Post subject: Flite; also HTK (Hidden Markov Model Toolkit) info  

Thanks, I'll download that and try it out soon.

In the meantime, I'm checking out flite again. I think I may be able to use it with one of these new, superior, hidden markov model type voices, which should be much more useful than Festival on a low powered machine. Time will tell - I'll first need to download the devx for Puppy 4.3.1; I've been meaning to do that for a while, but only having dialup, I never got round to the effort. I'll download it overnight though.

Good quality, locally installed, open source (or at least "free") speech synthesis is a bit of a holy grail some others, and I, have been after for a while...! :-) Bound to arrive some day.

Microsoft, by the way, owns the copyright to one of the main international university research efforts in the field (HTK: the Hidden Markov Model Toolkit - originally developed at Cambridge University, UK), though to be fair to MS, they licensed it back to the research community and have allowed them to release/distribute the source code under a simplified BSD license: http://htk.eng.cam.ac.uk/

EDIT: On second reading, I don't think it is a BSD license, but a Cambridge Univ own license - open source though - can't remember where I read the BSD bit. Camb Uni still maintains and develops HTK.

Flite (source code) for HTS voices here!: [url]hts-engine.sourceforge.net[/url]

in case anyone can't be bothered waiting on me making a dotpet of it (might take time - I'm painting a house for sale...)

Ah... the HTK license doesn't allow commercial use of the source... so the open source community can use it freely and develop it, but only Microsoft can use it commercially...

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2306
Location: New Zealand

PostPosted: Tue 24 Nov 2009, 05:22    Post subject: vozme  

vozme might be useful for your t2s script. It seems to be open source and freely accessible. Speech quality is very good (comes back as mp3).

I started a thread on vozme itself, just to announce it since nothing needs to be installed to make it work in a browser except a provided bookmarklet...

As for t2s, I can't get it to work there but since I don't really know what I'm doing that is not surprising:

Keeps coming back with the message from vozme: Text not found...

My latest try was:

Code:

#!/bin/sh
if [ ! $1 ];then
MYWORD=`xclip -o`
else
MYWORD=$@
fi
seamonkey -remote "openurl(http://vozme.com/text2voice.php?lang=en&interface=full&gn=fm&text=$MYWORD,NEW-TAB)"


Note: the seamonkey -remote "openurl etc...." needs to all be on one line, I just can't get it to appear like that on the forum.

But the above is probably all nonsense. It is too late at night now, so I'm hoping you will provide correct sequence to make it work...

EDIT: The above code works. In my failed previous attempt, I used ? instead of & in various places... Still hope you will check it for me since I'm clearly half asleep...

In the above, change gn=fm to gn=ml if you want to hear a male voice instead of a female one

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2234

PostPosted: Tue 24 Nov 2009, 08:35    Post subject:  

Nice find there on the flite-hts combination. I've been using flite for a long time and have searched a lot for alternate voices for it -looks like this is promising.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [21 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0996s ][ Queries: 13 (0.0053s) ][ GZIP on ]