12-16-2015, 04:16 AM | #1 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
icarus Sigil plugin (helps creating EPUB 3 Audio-eBooks)
icarus is a Sigil plugin to create EPUB 3 Audio-eBooks
Specifically, icarus provides the following three functions (which can be used independently one from another):
The final EPUB 3 Audio-eBook file can be then exported using the ePub3-itizer Sigil plugin, v0.3.4 or later. Version: 0.0.3 Date: 2016-02-13 License: MIT Code: https://github.com/pettarin/icarus Tutorial: https://github.com/pettarin/icarus/blob/master/tutorial Note: until reaching v1.0.0, this Sigil plugin should be considered experimental. Please report any issues or suggestions (preferably on GitHub: https://github.com/pettarin/icarus/issues ), thank you! Last edited by AlPe; 02-13-2016 at 07:48 AM. |
12-19-2015, 12:26 PM | #2 |
Sigil Developer
Posts: 8,090
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Added your plugin to the Sigil Plugin Index sticky to make it easier for MR users to find it.
Thanks for supporting Sigil! |
Advert | |
|
12-20-2015, 08:27 AM | #3 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
Great, thank you.
|
12-29-2015, 09:28 AM | #4 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
Uploaded v0.0.2 : Added option to add MO class only to tags with MO id attribute
|
01-20-2016, 04:37 PM | #5 |
Member
Posts: 13
Karma: 12
Join Date: Feb 2010
Device: X51V
|
hi AlPe - great job with this plugin , I was just looking for ways to create audio/text ebook and your plugin seem to be exactly what I was looking for. I'm going to give it a try and let you know how well it works for me.
Any plan to incorporate the aeneas job directly in your plugin, instead of just getting the config file? it will make things almost a "single click" capability. |
Advert | |
|
01-20-2016, 04:50 PM | #6 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
You are welcome.
I strongly suggest you to follow the tutorial along: https://github.com/pettarin/icarus/blob/master/tutorial Executing aeneas directly "inside" Sigil: you are right, it would be nice. However, it poses two main problems: 1. the user must have the aeneas toolchain installed (the Python aeneas package, ffmpeg and espeak) --- hence the generation of an aeneas ZIP job, that can be uploaded to aenesweb.org by those users unable to install aeneas on their machines; 2. aligning an (audio, text) pair might take from a few seconds to several minutes, depending on the length of the audio and the number of fragments. The user will have Sigil "blocked" for that time, as I think there is no way, in the current Sigil plugin architecture, to put the aeneas process in background. Plus, Sigil is incorporating EPUB3-related features (the next version, v0.9.3, will have "native" support for e.g. editing SMIL files), so I doubt I will work more on the "computing" side until the Sigil infrastructure will be more defined. |
01-22-2016, 10:54 AM | #7 |
Member
Posts: 13
Karma: 12
Join Date: Feb 2010
Device: X51V
|
Thanks for the instructionss.
One more question - what reader do you use to play/read these books? Thanks Eyal |
01-22-2016, 02:56 PM | #8 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
That's the sad part of the story.
Basically, the only two reading systems that allow you to sideload an EPUB3 Audio-eBook (= EPUB 3 reflowable with Media Overlays) and provide a decent UI/UX are: 1. Linux/OS X/Windows: Readium, free extension for Chrome developed by the IDPF. https://chrome.google.com/webstore/d...foaglimekefifl 2. Android/iOS: Menestrello, free app that I developed --- no longer developed/maintained. http://www.readbeyond.it/menestrello/index.html Other apps (e.g., AZARDI, Kobo, Gitden, ADE 4) can open Audio-eBooks, but they are buggy and/or does not provide a good (= specific for Audio-eBooks) UI/UX. Unfortunately, a majority of the apps out there does not support Media Overlays in reflowable EPUB 3 files (notably, iBooks). Finally, one can use Readium JS to host on a Web server, for example: http://www.readbeyond.it/ebooks.html (click on Read+Listen on one book of your choice) Last edited by AlPe; 01-22-2016 at 02:59 PM. |
01-22-2016, 07:11 PM | #9 |
Member
Posts: 13
Karma: 12
Join Date: Feb 2010
Device: X51V
|
Hmmm, I"ll try a few more (moon+, mantano, prestige) and see if there is any deliverance. and of course your app :-)
I"ve been tinkering with the installation of AENEAS on windows for a couple of hours now, and finally got to install all the components, took some time.... I ran the check setup scripts - all is good. Then I created a job file with icarus. when I run aeneas on the output I get an error: [INFO] Validating the container (specify --skip-validator to bypass)... [INFO] Validating the container... done [INFO] Loading job from container... [INFO] Loading job from container... done [INFO] Executing... [ERRO] An unexpected Exception occurred while executing the job: [ERRO] Error while executing task 't000001.xhtml': The given log message is not a Unicode string any idea? |
01-23-2016, 05:51 AM | #10 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
aeneas assumes the materials and the config strings to be encoded in UTF-8.
The most likely cause of your error is that your command prompt/console/shell is using a different encoding. Have you tried giving the following command: Code:
set PYTHONIOENCODING=UTF-8 For example: Code:
> set PYTHONIOENCODING=UTF-8 > python -m aeneas.tools.execute_job ... BTW, if you are using aeneas v1.4.0, it should have printed a warning message saying that your console is not using UTF-8. |
01-23-2016, 08:15 AM | #11 |
Member
Posts: 13
Karma: 12
Join Date: Feb 2010
Device: X51V
|
yep, I cleaned up all the error and warning messages, but the problem still happens.
I actually tried another book, but have the same problem, it starts running (I see ffmpg process running for a while, and then I get this error. I"ll keep digging. [INFO] Test 1/8 (shell encoding) [INFO] Checking whether your shell has UTF-8 support... [INFO] Checking whether your shell has UTF-8 support... succeeded. [INFO] Test 2/8 (import) [INFO] Trying to import package aeneas... [INFO] Trying to import package aeneas... succeeded. [INFO] Test 3/8 (ffprobe) [INFO] Trying to call ffprobe... [INFO] Trying to call ffprobe... succeeded. [INFO] Test 4/8 (ffmpeg) [INFO] Trying to call ffmpeg... [INFO] Trying to call ffmpeg... succeeded. [INFO] Test 5/8 (espeak) [INFO] Trying to call espeak... [INFO] Trying to call espeak... succeeded. [INFO] Test 6/8 (cdtw) [INFO] Python C Extension cdtw correctly loaded [INFO] Test 7/8 (cmfcc) [INFO] Python C Extension cmfcc correctly loaded [INFO] Test 8/8 (cew) [INFO] Python C Extension cew is not available for your OS [INFO] You can still run aeneas, but it will be a bit slower (than Linux) [INFO] Congratulations, all dependencies are met and core C extensions are available. [INFO] Enjoy running aeneas! |
01-23-2016, 08:25 AM | #12 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
You can get a more verbose log by using the "--verbose" switch.
You can have the log saved to a file with the "--log". E.g.: Code:
> python -m aeneas.tools.execute_job INPUT_PATH OUTPUT_PATH --verbose It might be a problem with Windows paths --- at the moment, Linux is the only supported OS (by aeneas). You can try uploading your job ZIP to http://aeneasweb.org and see if it works. If not, there is a bug in icarus. If it does, then there is a problem with aeneas and/or your running environment. In both cases, please let me know if you figure it out. If not, I might need to see the ZIP file generated by EDIT: icarus (maybe without the audio files). Last edited by AlPe; 01-23-2016 at 09:16 AM. Reason: aeneas => icarus in last sentence |
01-23-2016, 09:34 AM | #13 |
Member
Posts: 13
Karma: 12
Join Date: Feb 2010
Device: X51V
|
OK - run it with verbose on. see the errors below (I only put the log tail with the errors).
I tried yesterday to upload it to aeneas web, and its still not finished. I suspect its failing there as well. [DEBU] FFMPEGWrapper: Calling with arguments '['ffmpeg', '-i', u'c:\\users\\eyal\\appdata\\local\\temp\\tmpa4lasm \\a000001.mp3', '-ac', '1', '-ar', '22050', '-y', '-f', 'wav', 'c:\\users\\eyal\\appdata\\local\\temp\\tmphe5l9n. wav']' [DEBU] FFMPEGWrapper: Call completed [DEBU] FFMPEGWrapper: Returning output file path 'c:\users\eyal\appdata\local\temp\tmphe5l9n.wav' [DEBU] ExecuteTask: Converting... done [DEBU] ExecuteTask: Converting real audio to wav: succeeded [DEBU] ExecuteTask: STEP 0 END [DEBU] ExecuteTask: STEP 1 BEGIN [DEBU] ExecuteTask: Extracting MFCCs from real full wave [DEBU] AudioFileMonoWAVE: No audio data: loading it from file [DEBU] AudioFileMonoWAVE: Loading audio data... [CRIT] ExecuteTask: STEP 1 FAILURE [DEBU] ExecuteTask: Cleaning up... [DEBU] ExecuteTask: Removing file 'c:\users\eyal\appdata\local\temp\tmphe5l9n.wav' [DEBU] ExecuteTask: Cleaning up... done [CRIT] ExecuteJob: Error while executing task 't000001.xhtml': The given log message is not a Unicode string [CRIT] CLI: An unexpected Exception occurred while executing the job: [ERRO] An unexpected Exception occurred while executing the job: [CRIT] CLI: Error while executing task 't000001.xhtml': The given log message is not a Unicode string [ERRO] Error while executing task 't000001.xhtml': The given log message is not a Unicode string [DEBU] CLI: Execution completed with code 1 |
01-23-2016, 10:04 AM | #14 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
It looks like a problem with your MP3 file "a000001.mp3", which is the first MP3 (as renamed by icarus).
Can you try probing its properties? That is, what is the output of: Code:
> python -m aeneas.tools.read_audio PATH_TO_YOUR.mp3 Code:
> python -m aeneas.tools.extract_mfcc PATH_TO_YOUR.mp3 mfcc.out |
01-23-2016, 04:07 PM | #15 |
Member
Posts: 13
Karma: 12
Join Date: Feb 2010
Device: X51V
|
Thanks. read_audio works fine, the files are OK, but converting them to mfcc gives me a memory error (see below).
I tried a few audio books - each one is one very long file (6-12 hours) and they all get the same problem, when I try shorter audio files, they work fine. are you aware of a limit to the length of and audio book file? [INFO] Converting audio file to mono... [INFO] Converting audio file to mono... done Traceback (most recent call last): File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Python27\lib\runpy.py", line 72, in _run_code exec code in run_globals File "D:\My Data\Downloads\aenas\aeneas-master\aeneas\tools\extract_mfcc.py", line 107, in <module> main() File "D:\My Data\Downloads\aenas\aeneas-master\aeneas\tools\extract_mfcc.py", line 104, in main ExtractMFCCCLI().run(arguments=sys.argv) File "aeneas\tools\abstract_cli_program.py", line 300, in run exit_code = self.perform_command() File "D:\My Data\Downloads\aenas\aeneas-master\aeneas\tools\extract_mfcc.py", line 83, in perform_command audiofile.load_data() File "aeneas\audiofile.py", line 285, in load_data self.audio_sample_rate, self.audio_data = scipywavread(self.file_path) File "aeneas\wavfile.py", line 180, in read data = _read_data_chunk(fid, comp, noc, bits, mmap=mmap) File "aeneas\wavfile.py", line 78, in _read_data_chunk data = numpy.fromstring(fid.read(size), dtype=dtype) MemoryError |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
kindlegen plugin for Sigil | Doitsu | Plugins | 170 | 09-06-2024 08:52 AM |
epubcheck plugin for Sigil | Doitsu | Plugins | 519 | 07-22-2024 04:59 PM |
[Plugin] KindleImport Sigil plugin | DiapDealer | Plugins | 187 | 07-04-2022 10:11 AM |
Sigil Plugin Index | Thasaidon | Plugins | 0 | 10-04-2014 07:41 AM |
Trying to load the Icarus firmware back on Icarus EXcel | einkuser | Onyx Boox | 1 | 09-01-2014 11:34 PM |