How I got Opera's text-to-speech working with other Windows apps

Forums » General Opera topics » Accessibility and voice browsing

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

4. August 2009, 00:12:23

darius2k

Posts: 28

How I got Opera's text-to-speech working with other Windows apps

As has been mentioned elsewhere on this forum, Opera's text-to-speech feature has been broken since v9.5, and since apparently only about 5 of us actually care about this feature, it doesn't look like Opera is ever going to fix it.

And since text-to-speech was the only reason I was using Opera, I wanted to see if I could get it working through Firefox somehow. Not only have I done this, but I have also got it working with pretty much any Windows application that uses CTRL+C to copy text.

The way I did this was to use a Windows automation tool called AutoIt. Here are the exact steps I used:

- First, I mapped Opera's 'speak "%c" command to the c key. So, whenever I pressed the c key while Opera was the active Window, it would read whatever text was on the clipboard.

- I wrote an AutoIt script that would send a CTRL+C command to whatever the active window was (copying any selected text in that application to the clipboard) ....

- The script then does a 'remote send' of the c key to Opera, so that Opera will read text from the clipboard, even when it is minimized in the system tray.

- I then mapped this AutoIt script to a global hotkey, so I can select text in Firefox (or any other program) and press the hotkey, and PRESTO - Opera reads the text smile

- I also wrote another AutoIt script that sends a 'remote' mouse click to Opera, so I can make it stop reading text, and mapped that to a global hotkey too, so I have a 'start' hotkey to make Opera start reading text, and a 'stop' hotkey to make it shut up smile

The end result is not perfect... it occassionally 'misfires' and can't get the selected text from the active application, and it'll probably wreak havoc with any clipboard monitoring program if you have one running, but it works FAR better than it ever did in Opera. It doesn't have that annoying pause anymore over hyperlinks/bold/italic text, and I don't have to 'refresh' it on every web page anymore. I can browse the web while Opera reads, and don't have to worry about a mouse click stopping the speech. I can even do some search/replace of strings... for example, like when people censor out swear words by typing sh!t, I can change the ! to an i so that it's easier to understand when Opera reads it back

In short, it's GLORIOUS smile

If everyone hasn't been scared off by the details, I could post source code and even compile these two scripts into executables if it's something you think you might be interested in.

9. September 2009, 15:53:57

brianstamper

Posts: 88

Ok, you got my attention - this sounds awesome!

So, .. source for AutoIt script, please? smile

Brian


7. October 2009, 17:20:58

mjbgri

Posts: 5

Yes, please make the .exe. Thanks

I'm using Opera USB 9.56, USB 10 as well

Thanks in advance for your help. MJB

14. January 2010, 21:39:16

RALORING

Posts: 1

This sounds awesome!

Could you send me the source for AutoIt script, please as well as the .exe. Thanks?

I'm using Opera V10.10.

Thanks,
RAL

2. February 2010, 03:52:17

darius2k

Posts: 28

Ok guys, here it is. I never got around to getting rid of all the glitches, but I didn't want to leave you guys hanging forever smile I'm not claiming it's the most elegant code you've ever seen either. Basically, I just compiled and zipped up what I had written several months ago and dropped it here.

Even with its minor issues, I still think it works a hell of a lot better than Opera does on its own. Known bugs plus instructions for getting it running are in the readme.txt file. Would be interested to know how well it works for the rest of you, so post here with any questions/comments. Thanks!

File contains both binaries and source code.

opra_voice_control.zip

23. October 2011, 00:04:55

andre1000

Posts: 283

Thank you! I haven't tried it yet but it's this behavior that makes being online with people absolutely worthwhile. Thank you.

By the way. A couple of valuable things came to me recently.

govathome.com this isn't the right place for it.. or is it? We're all affected by 'our governement's' behavior. at
the least you'll learn something about why it would fix a major problem as I see it.

Back to this software. Ideally I'd like to move a better speaker into Opera's speech but frankly have never heard
one available online.

But what does the 1-800- toll free service use? It's got to be reading the names of of the entries of companies
when ... maybe I'm mistaken. The quality is perfect.

I've experienced other services which I'm very sure are using TTS (text to speech). Their pronunciation is perfect.
What are they using?

PS: see my 'about me, below.
It's from about 2001 but I can't find out where to change it. any tips would be appreciated.
Dell GX260 2.4Ghz P4 | 512 Ram | XP | Opera 8.54
Built in video card | Intel 800 series chipset to handle
video, ide, and pci bus.
SBC/ATT 1.5mbs DSL | onboard video

I know about Emission Spectroscopy, data collection, electronics, many sciences including optics, lasers, chemistry, mining, medicine/medical gold stocks and photography. Been building an electric bike and battery packs lately. Learning all I can about lithium batteries in consumer use

Forums » General Opera topics » Accessibility and voice browsing