Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-16-2015, 04:16 AM   #1
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1440161
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):
  1. automatically inserting MO attributes (id and class) into the XHTML files selected by the user;
  2. creating a ZIP file which can be read by aeneas or uploaded to aeneasweb.org to compute the SMIL files describing EPUB 3 Media Overlays;
  3. importing the SMIL files into the current Sigil eBook.

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!
Attached Files
File Type: zip icarus_v0.0.2.zip (17.6 KB, 368 views)
File Type: zip icarus_v0.0.3.zip (17.8 KB, 769 views)

Last edited by AlPe; 02-13-2016 at 07:48 AM.
AlPe is offline   Reply With Quote
Old 12-19-2015, 12:26 PM   #2
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 3,353
Karma: 1958478
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!
KevinH is offline   Reply With Quote
Advert
Old 12-20-2015, 08:27 AM   #3
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1440161
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
Great, thank you.
AlPe is offline   Reply With Quote
Old 12-29-2015, 09:28 AM   #4
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1440161
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
AlPe is offline   Reply With Quote
Old 01-20-2016, 04:37 PM   #5
eclipse123
Member
eclipse123 began at the beginning.
 
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.
eclipse123 is offline   Reply With Quote
Advert
Old 01-20-2016, 04:50 PM   #6
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1440161
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.
AlPe is offline   Reply With Quote
Old 01-22-2016, 10:54 AM   #7
eclipse123
Member
eclipse123 began at the beginning.
 
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
eclipse123 is offline   Reply With Quote
Old 01-22-2016, 02:56 PM   #8
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1440161
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.
AlPe is offline   Reply With Quote
Old 01-22-2016, 07:11 PM   #9
eclipse123
Member
eclipse123 began at the beginning.
 
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?
eclipse123 is offline   Reply With Quote
Old 01-23-2016, 05:51 AM   #10
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1440161
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
and then running aeneas again?

For example:

Code:
> set PYTHONIOENCODING=UTF-8
> python -m aeneas.tools.execute_job ...
(where > is the command prompt, e.g. "c:\aeneas\>" or something like that)

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.
AlPe is offline   Reply With Quote
Old 01-23-2016, 08:15 AM   #11
eclipse123
Member
eclipse123 began at the beginning.
 
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!
eclipse123 is offline   Reply With Quote
Old 01-23-2016, 08:25 AM   #12
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1440161
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
AlPe is offline   Reply With Quote
Old 01-23-2016, 09:34 AM   #13
eclipse123
Member
eclipse123 began at the beginning.
 
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
eclipse123 is offline   Reply With Quote
Old 01-23-2016, 10:04 AM   #14
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1440161
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
and

Code:
> python -m aeneas.tools.extract_mfcc PATH_TO_YOUR.mp3 mfcc.out
?
AlPe is offline   Reply With Quote
Old 01-23-2016, 04:07 PM   #15
eclipse123
Member
eclipse123 began at the beginning.
 
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
eclipse123 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
epubcheck plugin for Sigil Doitsu Plugins 219 06-23-2019 04:37 PM
kindlegen plugin for Sigil Doitsu Plugins 124 04-18-2019 11:46 AM
[Plugin] KindleImport Sigil plugin DiapDealer Plugins 151 09-27-2017 05:05 PM
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


All times are GMT -4. The time now is 02:02 PM.


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