Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daisy2.02 issue: part of footnote is not read #2752

Closed
lindheli opened this issue Jan 20, 2025 · 1 comment
Closed

Daisy2.02 issue: part of footnote is not read #2752

lindheli opened this issue Jan 20, 2025 · 1 comment

Comments

@lindheli
Copy link

lindheli commented Jan 20, 2025

For Daisy 2.02 tiltles there are issues with footnotes when the note body is split into two audio elements within a seq. Is it be because there is a gap between clip-end in the first audio and clip-begin in the second audio (which is intentional)?

Using Thorium 3.0, both audio elements are read when referenced from main text. But when reading the footnotes section, only the first audio in every footnote is read, and then the second audio for all the elements are read,

Using Thorium 3.1, only the first audio element is read for both occations.

See attached file for examples
A0108-tts-v4-daisy.zip

Content file, main text, note reference:

<span bodyref="#footnote-2" class="noteref" id="a-2">
   <a href="output-jonas a0108 announce-daisy2_0011.smil#smil0011_par_134">2</a>
</span>

Corresponding smil:

      <seq dur="12.024s">
        <!--Note reference-->
        <par endsync="last" id="smil0011_par_134">
          <text src="output-jonas a0108 announce-daisy2.html#a-2" id="smil0011_txt_134"/>
          <audio src="item-84449.mp3" clip-begin="npt=399.336s" clip-end="npt=403.296s" id="smil0011_audio_128"/>
        </par>
        <!--Note body-->
        <par endsync="last" system-required="footnote-on" id="smil0011_par_272">
          <text src="output-jonas a0108 announce-daisy2.html#000197" id="smil0011_txt_272"/>
          <seq dur="8.064s">
            <audio src="item-84455.mp3" clip-begin="npt=12.384s" clip-end="npt=18.072s" id="smil0011_audio_272"/>
            <audio src="item-84455.mp3" clip-begin="npt=21.336s" clip-end="npt=23.712s" id="smil0011_audio_273"/>
          </seq>
        </par>
      </seq>

Content file, footnote:

<div class="notebody" id="footnote-2">
   <p id="000197">
      <a href="output-jonas a0108 announce-daisy2_0011.smil#smil0011_par_268">2 Fotnot placerad i bildtext.</a>
   </p>
</div>

Corresponding smil:

<par endsync="last" system-required="footnote-on" id="smil0011_par_268">
   <text src="output-jonas a0108 announce-daisy2.html#000197" id="smil0011_txt_268"/>
   <seq id="smil0011_seq_2" dur="8.064s">
      <audio src="item-84455.mp3" clip-begin="npt=12.384s" clip-end="npt=18.072s" id="smil0011_audio_263"/>
      <audio src="item-84455.mp3" clip-begin="npt=21.336s" clip-end="npt=23.712s" id="smil0011_audio_264"/>
   </seq>
</par>
@danielweck
Copy link
Member

Yes, I suspect that the non-contiguous audio clips for the same audio file item-84455.mp3 (i.e. "large" time gap between 18.072s and 21.336s) are causing the parser to preserve the first and drop the second. This was a necessary bugfix because of other scenarios (i.e. audio sequences produced / authored differently) where playing the non-consecutive audio clips resulted in nonsense. This is a tricky problem to solve because technically under the hood the DAISY 2.02 / 3.0 SMIL etc. is converted to EPUB3 Media Overlays which offers a simpler model compared with the original Digital Talking Books audio segmentation model. I initially implemented a hack by factoring-out the individual audio clips (i.e. extracting them out of their containing seq, which doesn't exist at all in EPUB MO), thereby causing the creation of artificial par/text+audio pairs. Unfortunately this opened another can of worms so I reverted back to merging contiguous audio clips inside the seq ... unless they are not actually contiguous.

@edrlab edrlab locked and limited conversation to collaborators Jan 31, 2025
@danielweck danielweck converted this issue into discussion #2762 Jan 31, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants