Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 04-03-2016, 11:18 PM   #1
chye
Junior Member
chye began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2016
Device: Kobo Glo HD
[Viewer Plugin] Text to Speech

This is a very simple plugin that adds TTS to Calibre's ebook viewer.

I just wrote it up this weekend, so consider it a very rough alpha. Requires SAPI 5, so only works on Windows.

There are some other great existing TTS programs, like Balabolka, but I love Calibre's bookmarks and such, so I wanted to see if I could integrate it into the viewer.

Features:

- Press Play to start reading at the top of the visible page, or resume from last paused position
- Highlights the currently read paragraph and scrolls it into view if needed
(Note: This works better in flow mode. On paged mode, the bottom part of the paragraph tends to be clipped. )
- Select mode: When select mode is enabled, click on any paragraph to start reading from that paragraph
- Customize voice options and hotkeys in plugin config
Attached Files
File Type: zip TTS Ebook Viewer.zip (48.6 KB, 551 views)

Last edited by chye; 04-05-2016 at 03:13 AM.
chye is offline   Reply With Quote
Old 04-04-2016, 08:53 AM   #2
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 3,609
Karma: 6400998
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, Kobo Glo/AuraHD/Aura6"/AuraH2O/GloHD
Hi chye,

Well done for trying to add a new feature for all calibre users I appreciate this is very early days but thought I'd give some initial feedback ...

To make it more useable I would need to be able to select which of my several installed Voices to use. I don't think I could tolerate the default Microsoft voice for very long. Being able to choose the reading speed would also be useful. Do you have plans to add anything like this using the standard plugin Config facility?
jackie_w is online now   Reply With Quote
 
Advertisement
Old 04-04-2016, 11:50 AM   #3
chye
Junior Member
chye began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2016
Device: Kobo Glo HD
Quote:
Originally Posted by jackie_w View Post
Hi chye,

Well done for trying to add a new feature for all calibre users I appreciate this is very early days but thought I'd give some initial feedback ...

To make it more useable I would need to be able to select which of my several installed Voices to use. I don't think I could tolerate the default Microsoft voice for very long. Being able to choose the reading speed would also be useful. Do you have plans to add anything like this using the standard plugin Config facility?
Yep, these are all on my todo list to add.

You can also change the voice default in Control Panel > Speech Recognition > Text to Speech, but I do plan to add in-app configuration as well.
chye is offline   Reply With Quote
Old 04-04-2016, 01:38 PM   #4
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 3,609
Karma: 6400998
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, Kobo Glo/AuraHD/Aura6"/AuraH2O/GloHD
Quote:
Originally Posted by chye View Post
You can also change the voice default in Control Panel > Speech Recognition > Text to Speech ...
I did already try that, but the only Voice offered to me in Control Panel is Microsoft Anna.

Balabolka is able to see my AT&T and Nuance/Scansoft voices but not the Acapela ones. TextAloud can see all of them. I'm guessing the Acapela ones are somehow linked/licensed to TextAloud as that is where I bought them. I'm not sure why Control Panel doesn't see voices which Balabolka has no trouble with. Any ideas?
jackie_w is online now   Reply With Quote
Old 04-04-2016, 10:21 PM   #5
chye
Junior Member
chye began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2016
Device: Kobo Glo HD
Quote:
Originally Posted by jackie_w View Post
I did already try that, but the only Voice offered to me in Control Panel is Microsoft Anna.

Balabolka is able to see my AT&T and Nuance/Scansoft voices but not the Acapela ones. TextAloud can see all of them. I'm guessing the Acapela ones are somehow linked/licensed to TextAloud as that is where I bought them. I'm not sure why Control Panel doesn't see voices which Balabolka has no trouble with. Any ideas?
Hmm, that's interesting. For me, the other SAPI 5 voices that I have installed actually show up in control panel options - I'm running windows 10 with SAPI 5.4, not sure what version you have.

I did have some time today to try to add config options for voice controls and hotkeys though, so you can try the latest version if you like. I updated the top post.
chye is offline   Reply With Quote
Old 04-05-2016, 12:05 PM   #6
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 3,609
Karma: 6400998
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, Kobo Glo/AuraHD/Aura6"/AuraH2O/GloHD
I'm running Windows 7 64. I'm not sure which version of SAPI5 it is but I do know I haven't knowingly manually installed a newer version than the one the PC came with in 2013.

Anyway, the good news is that your new Config widget does now list all the same voices which appear in Balabolka so, thak you for that

Just for your info: the voices which are listed in the plugin Config are all the ones which appear in the registry under
Code:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens
namely, the voices from MS, AT&T and Scansoft.

The Acapela voices are not available in either Balabolka or your plugin. These voices appear in the registry under
Code:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\NextUpTech\Acapela TTS Multimedia 6\Speechfonts
and also under
Code:
HKEY_USERS\a_very_long_key\Software\Microsoft\Speech\Voices\TokenEnums\Acapela Multimedia
ETA: It might be handy to be able to access Config via the Viewer rather than having to go back to Prefs - Plugins - ... etc. and drill down several levels. However I don't know whether this is feasible.

Last edited by jackie_w; 04-05-2016 at 12:09 PM. Reason: ETA
jackie_w is online now   Reply With Quote
Old 05-04-2016, 07:57 PM   #7
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 6,990
Karma: 6294709
Join Date: Mar 2012
Location: NSW Australia
Device: none
I've noticed the presence of the plugin has a significant impact on the viewer performance, particularly when opening a file - eg from sub 2 seconds to 5-10 seconds, on the same epub on the same drive - i.e. similar to doing an inline conversion of a non epub file.

I tried disabling the PI, that made no difference, and it didn't disappear from the tool bar as I assumed it would.

BR
BetterRed is offline   Reply With Quote
Old 05-12-2016, 04:00 AM   #8
kimreadsalot
Junior Member
kimreadsalot began at the beginning.
 
Posts: 1
Karma: 10
Join Date: May 2016
Location: Alaska, USA
Device: kindle apps, kindles, E-book reader on calibre, Moon Reader, Tucan
Hi, just a word of appreciation for making this plug in, after a little initial difficulty, I got it to work just fine for me. After I upgraded Calibre to latest version, then it worked good for me, right now just using stock voice Microsoft zira, although plan to try others soon. It has always annoyed me that there is no simple way to TTS an ebook inside any ereader on my otherwise perfectly fine Surface Pro 3. I installed Amiduos, and kindle app and got immersion reading working if there is an audible version, but no way to listen with TTS for books that don't have Audible, and I like to read a lot of indie writers who don't have audible support. This works. I will be following looking for updates. Thank you again for developing this app.

Last edited by kimreadsalot; 05-12-2016 at 04:03 AM. Reason: additional information
kimreadsalot is offline   Reply With Quote
Old 07-02-2016, 04:21 PM   #9
toomuchreading
Zealot
toomuchreading once ate a cherry pie in a record 7 seconds.toomuchreading once ate a cherry pie in a record 7 seconds.toomuchreading once ate a cherry pie in a record 7 seconds.toomuchreading once ate a cherry pie in a record 7 seconds.toomuchreading once ate a cherry pie in a record 7 seconds.toomuchreading once ate a cherry pie in a record 7 seconds.toomuchreading once ate a cherry pie in a record 7 seconds.toomuchreading once ate a cherry pie in a record 7 seconds.toomuchreading once ate a cherry pie in a record 7 seconds.toomuchreading once ate a cherry pie in a record 7 seconds.toomuchreading once ate a cherry pie in a record 7 seconds.
 
toomuchreading's Avatar
 
Posts: 129
Karma: 1720
Join Date: Feb 2009
Location: Canada
Device: Toshiba e400, PRS-T1
Thank you so much for this plugin. It is great.
I did run across something that is strange though. The plugin will not work if you launch the ebook viewer outside of Calibre. For example: I have an icon on my desktop pointing to the ebook-viewer.exe file. When I click it, and the viewer launches, I open up a book, but I can't get the pluging to work. If I open up Calibre, launch the viewer, the plugin works fine.
I'm using Calibre portable on a Windows 8 laptop.
As I said I can get the plugin to work, I just have to launch the viewer from within Calibre. I'm wondering if something needs to be done to get the plugin to launch when the viewer is running without the main Calibre program? Do you get the same behaviour?
toomuchreading is offline   Reply With Quote
Old 07-04-2016, 01:01 AM   #10
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 18,910
Karma: 82611863
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
You are using calibre portable.

calibre portable sets the configuration directory (which contains, among other things, the plugin) to a portableized directory. But only if you use the main calibre program launcher.

When you run ebook-viewer on its own, it doesn't set the environment variable pointing to the portableized configuration directory and ebook-viewer doesn't see the plugin in the default, installed location for the configuration directory.

If you set the CALIBRE_CONFIG_DIRECTORY variable as instructed HERE, you can duplicate the effects of the calibre-portable.exe launcher, and make the ebook-viewer portable as well.
eschwartz is offline   Reply With Quote
Old 07-04-2016, 09:22 AM   #11
Krazykiwi
Connoisseur
Krazykiwi writes prose that makes the Gods weep.Krazykiwi writes prose that makes the Gods weep.Krazykiwi writes prose that makes the Gods weep.Krazykiwi writes prose that makes the Gods weep.Krazykiwi writes prose that makes the Gods weep.Krazykiwi writes prose that makes the Gods weep.Krazykiwi writes prose that makes the Gods weep.Krazykiwi writes prose that makes the Gods weep.Krazykiwi writes prose that makes the Gods weep.Krazykiwi writes prose that makes the Gods weep.Krazykiwi writes prose that makes the Gods weep.
 
Posts: 57
Karma: 104720
Join Date: Jan 2013
Device: Too many random androids to list
Re not seeing all the voices, this is known issue with 64 bit windows (and has been for several years...). You can run the alt control panel applet to get at the other ones,

Windows\sysWOW64\speech\SpeechUX\SAPI.cpl (or whatever the path is on your version of windows)

This will let you set the default voice to something other than Anna, hopefully.

(here's a TechNet post from 2009 about this exact thing (the answer, not the question) https://social.technet.microsoft.com...set-as-default

If you search around, there's plenty on the topic, but no real fix other than "use the old control panel applet".
Krazykiwi is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Viewer Plugin] Get selected text on right click. jverrone3 Development 1 03-27-2015 10:57 PM
How to register a plugin to viewer selected text context menu? Gerbrand Development 2 05-04-2014 01:24 PM
Text to speech plugin? mlevin77 Plugins 4 05-07-2013 07:38 AM
How to make Amazon Kindle Text to Speech skip over some text xsaero00 Kindle Developer's Corner 3 06-18-2011 07:09 PM
No more text to speech??? pippin65 Amazon Kindle 22 11-16-2009 04:27 PM


All times are GMT -4. The time now is 07:06 AM.


MobileRead.com is a privately owned, operated and funded community.