[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: audio epubs
Hi all. I might be stretching a bit far here but worth trying.Is it possible to do a lot of the work to make audio epubs using stylesheets?
First, how to auto generate ids for each <para>? I'm sure that is straightforward. (Or if more granularity is needed then id's at the sentence or word level as needed).
Second, populate the smil file with the ids<smil xmlns="http://www.w3.org/ns/SMIL" xmlns:epub="http://www.idpf.org/2007/ops" version="3.0">
<body>
<seq id="id1" epub:textref="index.xhtml" epub:type="bodymatter
chapter">
<par id="paragraph1">
<text src="index.xhtml#para-id1"/>
<audio src="audio/file.mp3" clipBegin="0:00:02.000"
clipEnd="0:00:15.000"/>
</par>
<par id="paragraph2">
<text src="index.xhtml#para-id2"/>
<audio src="audio/file.mp3" clipBegin="0:00:15.000"
clipEnd="0:00:25.000"/>
</par>
....
</seq>
</body>
</smil>
The smil file would need manually editing for the clipBegin and clipEnd
for each but that's fine. The audio src could be passed as a parameter.
Then add something like .-epub-media-overlay-active {background-color:
#abc;} to the css.
Finally modify the package.opf to add<meta property="media:duration" refines="#chapter1_overlay">0:04:30.000</meta> <meta property="media:duration" refines="#chapter2_overlay">0:03:30.000</meta>
....
<meta property="media:duration">0:08:00.000</meta>
<meta property="media:narrator">Narrator Name</meta>
<meta property="media:active-class">-epub-media-overlay-active</meta>
</metadata>
<manifest>
<item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
<item id="htmltoc" properties="nav"
media-type="application/xhtml+xml" href="ar01-toc.xhtml"/>
<item media-type="text/css" id="docbook-css" href="docbook-epub.css"/>
<item id="id-idm21776" href="index.xhtml"
media-type="application/xhtml+xml" media-overlay="chapter1_overlay"/>
<item id="chapter1_overlay" href="chapter1_overlay.smil"
media-type="application/smil+xml"/>
....
Is something like this doable?
Peter
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]