10-22-2020, 12:34 PM | #46 | ||
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Quote:
Are you able to pursue the mp3 creation or are you wanting me to do something? If the latter how do I get access to the new winstuff? BTW I haven't been idle I've spent the last 2 days trying to get Doitsu's suggested comtypes method working. I thought it was going to be fine because I could run the jobs.process_file() function via a simple calibre-debug script and both WAV/MP3 were created OK for both v4.23 (via win32com) and v5.2 (via comtypes). But as soon as I tried to run it under the calibre jobs system in v5.2 I could no longer create a WAV. v4.23 still worked OK under jobs, both WAV and MP3. |
||
10-22-2020, 12:52 PM | #47 |
creator of calibre
Posts: 44,381
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Your existing plugin already does wav to mp3 conversion using lame, that part will remain the same. I will upload a beta windows build for you, so you can access the winsapi module. You just need to do
Code:
from calibre_extensions.winsapi import ISpVoice spv = ISpVoice() spv.create_recording_wav('test.wav', 'Hello, world!') |
Advert | |
|
10-22-2020, 01:05 PM | #48 | |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Code:
calibre-64bit-5.3.0.msi 22-Oct-2020 17:02 59228160 Last edited by jackie_w; 10-22-2020 at 01:13 PM. Reason: ETA. |
|
10-22-2020, 01:29 PM | #49 |
creator of calibre
Posts: 44,381
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yeah, it's fully uploaded now.
|
10-22-2020, 02:34 PM | #50 |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Thanks. There's plenty for me to get my head around here.
Are all the ISpVoice methods(???) shown in your Git link? Will it still be possible to use the plugin's Select Files/TestVoice page to start/stop ad-hoc speech. I don't see a 'pause' option in your link. I think I still need some help in how to handle the events stuff that is in the current plugin (inherited, not developed by me). These bits: Spoiler:
|
Advert | |
|
10-23-2020, 12:12 AM | #51 |
creator of calibre
Posts: 44,381
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yes, there are speak(), wait_until_done(), pause() and resume() methods as well, that doe the obvious things.
You dont actually need events, just ignore that. call speak('some text') to speak it out loud. Look in winsapi.cpp at Voice_methods for the full list of methods, not all of them are testable. |
10-23-2020, 02:43 PM | #52 | |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Last edited by jackie_w; 10-23-2020 at 06:25 PM. Reason: Add 3rd item |
|
10-23-2020, 08:46 PM | #53 |
creator of calibre
Posts: 44,381
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
1) You can pass flags to speak as the second argument, it's just a wrapper for https://docs.microsoft.com/en-us/pre...9384(v=msdn.10) and the list of flags is here: https://docs.microsoft.com/en-us/pre...7460(v=msdn.10)
2) Just call wait_until_done(10) or some similarly small number of milliseconds. to check when speaking is completed. You can use a QTimer to call it repeatedly. 3) As far as I know it should work fine on 32bit, there is nothing 64bit specific in the code. I will upload a 32bit beta well later today. |
10-23-2020, 09:34 PM | #54 | ||
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Quote:
Thanks. I've never understood why the original problem occurred. |
||
10-24-2020, 12:06 AM | #55 |
creator of calibre
Posts: 44,381
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
https://docs.microsoft.com/en-us/pre...384(v=msdn.10) is a working link, I hope.
Here you go Code:
def check_speaking_done(self): if self.sapi.wait_until_done(10): # speaking is done else: QTimer.singleShot(10, self.check_speaking_done) |
10-24-2020, 08:53 AM | #56 | |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
|
|
10-24-2020, 05:38 PM | #57 | |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
@Kovid,
Just to let you know that I now have all previous functionality restored. I can't thank you enough for your support! Quote:
After a bit more testing I'll be updating post #1 in the next few days in good time for next Friday's release of calibre v5.4. |
|
10-24-2020, 11:08 PM | #58 |
creator of calibre
Posts: 44,381
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You are most welcome
|
10-28-2020, 02:35 PM | #59 |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
TTS to MP3 upgrade 0.5.4
There has been a technical decision made to remove various Windows modules from calibre's code base from v5.4 onwards. This has necessitated changes to this plugin to keep it running.
Users of calibre v5.4 (or higher) must also upgrade to TTS to MP3 v0.5.4 Users of calibre v3.41-v5.3 (inclusive) must keep TTS to MP3 v0.4.x N.B: Calibre's automated plugin update system will not offer this plugin upgrade to existing users until they have already upgraded their calibre version to v5.4, which I believe is planned for October 30th, 2020.
This update has involved quite a lot of changes (even if it doesn't look like it ) so, if you have any problems, please report them here. Last edited by jackie_w; 10-28-2020 at 02:40 PM. |
10-28-2020, 05:07 PM | #60 | |
Resident Curmudgeon
Posts: 76,002
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Tags |
calibre, mp3, neural, tts, voices |
Thread Tools | Search this Thread |
|
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 |