Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-11-2020, 08:31 AM   #16
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,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@KindleAZWorKFX,

I'm not sure what else I can say that I haven't already said. I don't have the technical skill-set to write a plugin which will interface with Chrome or any other web-based app.

@BetterRed,

As for Balabolka, I looked at the main website yesterday. I didn't see any teasers about plans to work with cloud-based voices - but that doesn't prove anything, of course. Let's wait and see.

Perhaps a relevant point is that I do have this app loaded on my PC (as a portable app rather than fully installed), but the only voices available by default were the ones in the
Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Speech Server\v11.0
section of the Windows registry, which are pretty old, and pre-date the Win10 voices. By doing a bit of (non-user-friendly) registry hacking (similar to those referenced in post #2) I was able to access my purchased Ivona voices (the 32-bit versions of them) but I didn't find any Balabolka option to make scanning for these extra voices easy. Did I miss something? On my 64-bit PC, using 64-bit calibre, this plugin as-is locates the Ivona voices (the 64-bit versions of them) without having to do anything at all.

On a more general point the handling of voices in Windows looks like a bit of a dark art. There is endless repetition of voice code throughout the registry. Even in the MS Edge section the same voices are listed in two different places. This is the key for one of them on my PC
Code:
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\Children\001\Software\Microsoft\Speech_OneCore\Isolated\k6BwW5fty3XWMlmQDjzUq77TXIsLVjJGt268p8btklc\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech_OneCore\Voices\Tokens\MSTTS_V110_enGB_SusanM]
Delightful! If, when they arrive, the new cloud-based voices turn up in the same place then I'll see them and do some tests but the "cloud-based" description makes me wonder whether there will be any local files installed at all.
jackie_w is offline   Reply With Quote
Old 05-03-2020, 04:58 PM   #17
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,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
TTS to MP3 upgrade 0.4.0

  • Maintenance upgrade for python3 compatibility.
  • Plugin icon updated to be more visible when using calibre's Dark mode.

Plugin should now work with both calibre current production version (v4.15) and calibre python3 beta versions v4.99.x.

If any problems, please report them here.
jackie_w is offline   Reply With Quote
Advert
Old 05-05-2020, 06:14 PM   #18
Fiat_Lux
Addict
Fiat_Lux ought to be getting tired of karma fortunes by now.Fiat_Lux ought to be getting tired of karma fortunes by now.Fiat_Lux ought to be getting tired of karma fortunes by now.Fiat_Lux ought to be getting tired of karma fortunes by now.Fiat_Lux ought to be getting tired of karma fortunes by now.Fiat_Lux ought to be getting tired of karma fortunes by now.Fiat_Lux ought to be getting tired of karma fortunes by now.Fiat_Lux ought to be getting tired of karma fortunes by now.Fiat_Lux ought to be getting tired of karma fortunes by now.Fiat_Lux ought to be getting tired of karma fortunes by now.Fiat_Lux ought to be getting tired of karma fortunes by now.
 
Fiat_Lux's Avatar
 
Posts: 393
Karma: 6700000
Join Date: Jan 2012
Location: Gimel
Device: tablets
Any chance of this being modified to work on Macs or Linux boxes?
Fiat_Lux is offline   Reply With Quote
Old 05-05-2020, 06:45 PM   #19
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,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Fiat_Lux View Post
Any chance of this being modified to work on Macs or Linux boxes?
Not by me, I'm afraid. The plugin's existing GUI functions could probably be re-used by Mac/Linux without too much effort but it's the OS text-to-speech components which are the showstoppers.

There may be Mac/Linux utilities around which could replace the LAME.exe (free) Windows utility which converts from .WAV to .MP3, but the utilities necessary to do the initial conversion from text to .WAV (including the Voices used) are part of Windows itself.

If there is similar built-in functionality and Voices for Mac and/or Linux it would need someone who is familiar with those OS's to do the research and work.
jackie_w is offline   Reply With Quote
Old 05-10-2020, 05:35 AM   #20
DictatorAlly
Enthusiast
DictatorAlly began at the beginning.
 
Posts: 26
Karma: 10
Join Date: May 2020
Device: None
Linux user's could use something like this:
https://github.com/mozilla/TTS

Ideally you'd run a docker with an imported model already trained and then have the calibre plugin interface with that.

Google's TTS is rather expensive at $16/1m characters, the first 1m/month is free though, perhaps an implementation to that would be worthwhile as well.
DictatorAlly is offline   Reply With Quote
Advert
Old 08-07-2020, 08:24 PM   #21
nickmik123
Junior Member
nickmik123 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2018
Device: none
subtitles

is it possible to create subtitles (I'm using VLC to play the mp3's). What output format should be used?
nickmik123 is offline   Reply With Quote
Old 08-07-2020, 10:10 PM   #22
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,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by nickmik123 View Post
is it possible to create subtitles (I'm using VLC to play the mp3's). What output format should be used?
Aren't subtitles something you add to video files rather than MP3 files?

As I've already outlined in post #12, this plugin is just a GUI wrapper to:
  • Use MS Windows SAPI5 Text-to-Speech builtin utilities to create a .WAV file from a plain text string extracted from a single chapter of a calibre book.
  • Use the commandline version of the free LAME.exe Windows utility to convert .WAV to .MP3 with appropriate MP3tags for the book.

I don't know of any LAME options which would create a subtitles file.

I seem to remember that I did consider adding the chapter text as MP3 lyrics, but, at the time, I had no success being able to do this automatically during MP3 creation. I'd be willing to look at that again if anyone wants to share knowledge about how to do it with commandline LAME (if it's possible).
jackie_w is offline   Reply With Quote
Old 10-19-2020, 08:48 AM   #23
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@jackiew: the next release of calibre is no longer bundling pywin32 so you can tuse win32com/win32process/etc anymore. If there are particular APIs you need wrapped, i can add them to the calibrewinutil module, if you send me a list.
kovidgoyal is online now   Reply With Quote
Old 10-19-2020, 01:29 PM   #24
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,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by kovidgoyal View Post
@jackiew: the next release of calibre is no longer bundling pywin32 so you can tuse win32com/win32process/etc anymore. If there are particular APIs you need wrapped, i can add them to the calibrewinutil module, if you send me a list.
I think I understood the gist of your post to mean that this plugin will stop working soon unless I do 'something'. And that you're offering to help by providing some additional 'somethings' in calibrewinutil.

But, I'm afraid I have no idea exactly what you're asking for in the bolded bit. Can you ask it in layman's terms, please?

Are you asking which win32xxx modules I'm actually importing from and which specific parts of them I actually reference in the code? Or are you asking for something else entirely?

The problem I have is that most of this plugin's low-level win32 code was inherited 'as-is' from someone else's calibre Viewer TTS plugin. I presume they understood it. Unfortunately they're long gone and my understanding of the win32 stuff is minimal. I realise this isn't ideal ...
jackie_w is offline   Reply With Quote
Old 10-19-2020, 10:53 PM   #25
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by jackie_w View Post
Are you asking which win32xxx modules I'm actually importing from and which specific parts of them I actually reference in the code? Or are you asking for something else entirely?
Yes, exactly. I can wrap those same things inside the calibre winutil module so you can use them from there, instead.

Quote:
The problem I have is that most of this plugin's low-level win32 code was inherited 'as-is' from someone else's calibre Viewer TTS plugin. I presume they understood it. Unfortunately they're long gone and my understanding of the win32 stuff is minimal. I realise this isn't ideal ...
Hmm, well that is unfortunate.
kovidgoyal is online now   Reply With Quote
Old 10-20-2020, 10:55 AM   #26
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,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by kovidgoyal View Post
Yes, exactly. I can wrap those same things inside the calibre winutil module so you can use them from there, instead.

Hmm, well that is unfortunate.
I've tidied up the existing win32 import statements and checked that the plugin still appears to be functioning OK on Win10 after the changes:
- calibre 64-bit v5.2
- calibre 32-bit v4.23.

I believe this is the full list of win32 imports:
Code:
from win32com.client import WithEvents
from win32com.client import Dispatch
from win32com.client import DispatchBaseClass
from win32com.client import CoClassBaseClass
from win32com.client import CLSIDToClass
from win32com.client import util as w32comclient_util

from win32com.server import util as w32comserver_util
from win32com.server.policy import EventHandlerPolicy

from win32process import CreateProcess
from win32process import STARTUPINFO

from win32event import WaitForSingleObject
from win32event import INFINITE

from win32con import STARTF_USESHOWWINDOW, SW_HIDE, CREATE_DEFAULT_ERROR_MODE
In case it's relevant, these 2 imports are also used in the '5000-line black box'. They're not ones I've ever knowingly used elsewhere in my other plugins.
Code:
import pythoncom
from pywintypes import IID
jackie_w is offline   Reply With Quote
Old 10-20-2020, 11:47 AM   #27
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm that's a rather large list. Will look into it, can you post your cleaned up plugin.
kovidgoyal is online now   Reply With Quote
Old 10-20-2020, 01:07 PM   #28
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,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Attachment 182895
Quote:
Originally Posted by kovidgoyal View Post
Hmm that's a rather large list. Will look into it, can you post your cleaned up plugin.
See attached zip.

The 'big black box' is the tts_typelib.py file. The other 2 files referencing win32xxx are utils.py and other_dlgs.py.

I believe its possible that
Code:
from win32process import CreateProcess
from win32process import STARTUPINFO
can now use subprocess instead now we're at python3? CreateProcess was only ever used as an alternative because some of the commandline mp3-tagging args for lame.exe (e.g. Author and Title) could have non-ascii values. I'm looking at this at the moment.

Also, the last 2 lines of the original list are all integer constants so I suppose I could just hard-code their values??? I don't know if they are subject to change over time.

Last edited by jackie_w; 10-20-2020 at 10:50 PM. Reason: zip removed. See next post, #29, for updated list and zip
jackie_w is offline   Reply With Quote
Old 10-20-2020, 09:12 PM   #29
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,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@Kovid,

Is it safe to assume that for users of calibre version <= 4.23, the win32 modules will always be available?

If so, I believe I now have subprocess working OK in python3/calibrev5.2 with unicode args. In which case the last 5 rows can be removed from my original list

Code:
from win32com.client import WithEvents                                  #function
from win32com.client import Dispatch                                    #function
from win32com.client import DispatchBaseClass                           #class
from win32com.client import CoClassBaseClass                            #class
from win32com.client.CLSIDToClass import RegisterCLSIDsFromDict         #function
from win32com.client.util import Iterator as w32comclient_util_iterator #class

from win32com.server.util import wrap as w32comserver_util_wrap         #function
from win32com.server.policy import EventHandlerPolicy                   #class

from win32process import CreateProcess
from win32process import STARTUPINFO

from win32event import WaitForSingleObject
from win32event import INFINITE

from win32con import STARTF_USESHOWWINDOW, SW_HIDE, CREATE_DEFAULT_ERROR_MODE
ETA: All imports are now either a class or a function (rather than its module).
The attached updated plugin still seems to work OK in v4.23 and v5.2

Last edited by jackie_w; 10-25-2020 at 06:40 PM. Reason: zip removed, no longer relevant
jackie_w is offline   Reply With Quote
Old 10-20-2020, 10:51 PM   #30
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes, for 4.x they are. I will take a look at the rest.
kovidgoyal is online now   Reply With Quote
Reply

Tags
calibre, mp3, neural, tts, voices


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] TTS - Windows TTS output plugin Doitsu Plugins 12 05-18-2018 09:43 PM
How to install "incompatible" apps to Boox M96+T68. IVONA TTS, ACAPELA TTS etc. Booxtor Onyx Boox 24 04-19-2017 05:08 AM
which one you will prefer an audiobook or tts webroot Audiobook Discussions 4 08-06-2015 03:40 PM
E-ink device with TTS/audiobook integration verona Which one should I buy? 21 05-15-2013 06:11 PM
GUI Launcher greyed out when TTS is on and does not come back when TTS is off jmseight Kindle Developer's Corner 4 07-28-2012 02:48 AM


All times are GMT -4. The time now is 03:04 AM.


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