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, 13968 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
Grand Sorcerer
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: 6,171
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
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 offline   Reply With Quote
Advert
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
Grand Sorcerer
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: 6,171
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
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 offline   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
Advert
Old 04-05-2016, 12:05 PM   #6
jackie_w
Grand Sorcerer
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: 6,171
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
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 offline   Reply With Quote
Old 05-04-2016, 07:57 PM   #7
BetterRed
null operator (he/him)
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: 20,458
Karma: 26645808
Join Date: Mar 2012
Location: Sydney 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
Groupie
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: 162
Karma: 1720
Join Date: Feb 2009
Location: Canada
Device: 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
Ex-Helpdesk Junkie
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: 19,422
Karma: 85397180
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
Zealot
Krazykiwi ought to be getting tired of karma fortunes by now.Krazykiwi ought to be getting tired of karma fortunes by now.Krazykiwi ought to be getting tired of karma fortunes by now.Krazykiwi ought to be getting tired of karma fortunes by now.Krazykiwi ought to be getting tired of karma fortunes by now.Krazykiwi ought to be getting tired of karma fortunes by now.Krazykiwi ought to be getting tired of karma fortunes by now.Krazykiwi ought to be getting tired of karma fortunes by now.Krazykiwi ought to be getting tired of karma fortunes by now.Krazykiwi ought to be getting tired of karma fortunes by now.Krazykiwi ought to be getting tired of karma fortunes by now.
 
Posts: 137
Karma: 2156958
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
Old 08-13-2017, 07:24 AM   #12
Olomov
Junior Member
Olomov began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2017
Device: pocketbook touch hd
I am new here, I am not a programmer but I wonder if the following is an option. The Pocketbook reader runs on Linux. And it offers a couple of superb voices http://www.pocketbook-int.com/nl/sup...tbook-touch-hd My question is, is it possible to run those voices on a linux or other computer (and instruct calibre to use those). Linux is open source right? So i guess no rules are broken when those voices are ported to a pc.
Olomov is offline   Reply With Quote
Old 09-06-2017, 02:56 PM   #13
Icy13
Junior Member
Icy13 began at the beginning.
 
Posts: 4
Karma: 14
Join Date: Aug 2007
Device: none
Really Really Laggy (Windows 10 Creators Update x64)

Really excited to find this plugin, but I'm having difficulty getting it to work as intended.

As a previous user mentioned, just opening a book is slower (<2 seconds to more like 30seconds).

When I start trying to read aloud, the calibre worker thread goes to 40-50% processor load and I get maybe 1 sentence/block every 30 seconds.

Am I doing something wrong or is this expected behavior.

Specs:
Calibre x64
Windows 10 Pro x64 (Build 15063, latest as of post)
Lenovo Yoga 2 Pro
8gb Ram
Intel Core i7-4500U

For comparison, running TTS in the Foxit PDF reader app, I get none of these problems. Smooth readings, not crazy processor load. I beleive it uses SAPI5 also.

I would also recommend adding an option to change the speed of speech as I have been spoiled by podcasts at 1.3x. Check out the Foxit reader controls and options for inspiration. They aren't perfect but they provide vital minimum functions. https://www.foxitsoftware.com/pdf-reader/ (No, I don't work for them, I just use it for my pdf-heavy job as a grad student)
Icy13 is offline   Reply With Quote
Old 09-06-2017, 07:30 PM   #14
BetterRed
null operator (he/him)
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: 20,458
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Icy13 - this plugin never really got beyond being 'experimental', which is why it's not in the Plugin Index, and given the author hasn't posted since April last year I'd say he/she has abandoned it.

For TTS I use the Balabolka program, which I can access via calibre's built Open With feature. It also has the advantage of being usable directly.

And, whenever you read non ePub formats (e.g. PDF) in the calibre viewer it converts the file to ePub which can generate a large quantities of redundant markup. I would guess this PI parses the ePub skipping the markup.

BR
BetterRed is offline   Reply With Quote
Old 09-11-2017, 01:22 PM   #15
Icy13
Junior Member
Icy13 began at the beginning.
 
Posts: 4
Karma: 14
Join Date: Aug 2007
Device: none
Thanks @BetterRed. I had hoped that the recent posts meant that this thread might still be alive but your alternative solution is better. I've used Balabolka before but never for in-app use; only for generating audio files for later enjoyment (audiobooks of old, obscure pulp paperbacks that I never the less enjoy over and over).

I'll explore balabolka for on-the-fly use.
Icy13 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 09:14 PM.


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