05-13-2018, 08:29 AM | #1 |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
[Plugin] TTS - Windows TTS output plugin
Released: May 13, 2018
Current Version: "0.1.0" This plugin allows you to generate MP3 files of all files selected in the Book View window. (To select all files, click the Text folder.) Note that this plugin has not been optimized for speed. If you want to generate mp3 files for a whole book, use jackie_w's TTS to MP3 Calibre plugin, which is two to three times faster than my plugin. Credits: This plugin uses Joshua Milas's SAPI5 TTS library for generating WAV files and LAME for generating MP3 files. System requirements This plugin requires Windows 7 or higher and Sigil 0.8.9 or higher. If you're using an external Python 3 interpreter, you'll need to install bs4, tts and comtypes. (Note that this plugin does not work with Linux and macOS machines.) Installation 1. Select Manage Plugins from the Plugins menu. Make sure that Use Bundled Python is checked. (If you're using an older Sigil version, select a Python 3 interpreter and install bs4, tts and comtypes.) 2. Click Add Plugin and select TTS_v0.1.0.zip. This will install the TTS plugin, which you can select via Plugins > Output > TTS. Settings The plugin doesn't come with a settings dialog box. However, advanced users can change some settings by adding/editing the following TTS.json entries. Code:
"rate": 0, Code:
"desktop_folder": "C:\\MyFolder", Installing additional TTS voices Advanced Windows users can install additional Catalan, Danish, German, English, Spanish, Finnish, French, Italian, Japanese, Korean, Norwegian, Dutch, Polish, Portuguese, Russian, Swedish and Chinese Microsoft Speech Platform voices. For details see this website. If you have Windows 10 you can also enable hidden Cortana voices, e.g., Microsoft Mark and Microsoft Eva. For more information see this website. Make sure to check the following registry key before importing the registry files provided by the website! Code:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech_OneCore\Voices\Tokens Last edited by Doitsu; 06-17-2018 at 12:31 PM. |
05-13-2018, 08:31 PM | #2 |
null operator (he/him)
Posts: 21,003
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
This could be useful. At the moment I achieve a similar result using Balabolka, but I'm always looking to reduce my toolset.
Could there be an option to save the MP3 alongside the EPUB from which it was created? FX: if the EPUB is at D:\Ebooks\Fred Bloggs - Hills at Dawn.epub, then the MP3 would be saved at D:\Ebooks\Fred Bloggs - Hills at Dawn.mp3 BR |
Advert | |
|
05-14-2018, 02:00 AM | #3 |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
|
05-14-2018, 04:43 AM | #4 |
null operator (he/him)
Posts: 21,003
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Fair 'nuff, bit of a bummer tho'.
"Any chance of re-shaping it into a calibre Conversion plugin?" he asked half-jokingly. I'm away from my base, so I can't suck it and see. When it saves to the desktop does it use the EPUB file name, and what happens if the EPUB has just been created in Sigil, perhaps via an Import plugin, and hasn't been saved? BR |
05-14-2018, 05:30 AM | #5 | ||
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Maybe you should ask about it in the Calibre Plugin Ideas thread. (I'm pretty sure it'd take a Calibre Plugin developer less than an hour to hammer out the code.) Quote:
|
||
Advert | |
|
05-14-2018, 12:54 PM | #6 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
|
05-14-2018, 01:56 PM | #7 | |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Indeed you did add it: https://github.com/Sigil-Ebook/Sigil...1cb6f07155f055 bk.get_epub_filepath() will be in the next release of Sigil |
|
05-18-2018, 09:14 AM | #8 | |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
In these days of paid-for audiobook subscriptions I'm not sure how niche computer-generated TTS is. However, if I come up with anything useful, would you be OK with me making it available in the calibre plugin forum? Obviously I would credit you for the original work. No promises yet but, if I do manage to create something workable, would you be willing to play guinea-pig? |
|
05-18-2018, 09:45 AM | #9 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
05-18-2018, 10:09 AM | #10 | |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Code:
voice = comtypes.client.CreateObject('Sapi.SpVoice') Code:
voice = win32com.client.Dispatch("SAPI.SpVoice") ETA: Also, I'm currently favouring a calibre User Interface type of plugin rather than a calibre Editor plugin. Mainly because it has full access to calibre library metadata rather than just the current OPF contents. It would also make it easier to extend the functionality (at a later date) to processing multiple books at a time. Last edited by jackie_w; 05-18-2018 at 10:15 AM. Reason: ETA |
|
05-18-2018, 08:50 PM | #11 | |||
null operator (he/him)
Posts: 21,003
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Quote:
Quote:
BR |
|||
05-18-2018, 10:13 PM | #12 | |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
That one's easy to answer. I'm afraid I know nothing about Conversion plugins and I'm not really interested in spending the necessary time to become proficient. I can do all I need to do for my own purposes with User Interface and Editor plugins. |
|
05-18-2018, 10:43 PM | #13 | ||
null operator (he/him)
Posts: 21,003
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
First time I have to drop the MP3 into calibre's book details panel to get to its existence recorded in calibre's database; a conversion plugin would obviate the need for that step. It's no big deal, if I open an RTF in Word and save as DOCX and/or PDF I have to do the same thing, same for video format shifting. Quote:
BR |
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Plugin] HTMLgen Output Plugin | PeTrDu | Plugins | 32 | 08-25-2022 11:11 AM |
How to install "incompatible" apps to Boox M96+T68. IVONA TTS, ACAPELA TTS etc. | Booxtor | Onyx Boox | 24 | 04-19-2017 06:08 AM |
Problem with TTS on OnyxBoox M92 "invalid TTS data" | Marion Juin | Onyx Boox | 1 | 03-27-2013 06:56 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 03:48 AM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 03:24 AM |