elan annotation export format

Dear Han

I am here again to bother you, Xddd.

Recently, I was looking into the wavesurfer plugin for ELAN, whose demo can be found at: https://wavesurfer-js.org/example/elan/index.html?fill

I noticed that their exported annotation file is in .xml format. Parts of that file look like below:

<?xml version=“1.0” encoding=“UTF-8”?>
<ANNOTATION_DOCUMENT AUTHOR=“Mikhail Buryakov” DATE=“2012-11-20T07:49:32+04:00” FORMAT=“2.6” VERSION=“2.6” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=“http://www.mpi.nl/tools/elan/EAFv2.6.xsd”>
<HEADER MEDIA_FILE="" TIME_UNITS=“milliseconds”>
<MEDIA_DESCRIPTOR MEDIA_URL=“001z.mp3” MIME_TYPE=“audio/mpeg”/>
</HEADER>

<TIME_ORDER>
<TIME_SLOT TIME_SLOT_ID=“TS0” TIME_VALUE=“0”/>
<TIME_SLOT TIME_SLOT_ID=“TS1” TIME_VALUE=“230”/>
<TIME_SLOT TIME_SLOT_ID=“TS2” TIME_VALUE=“1840”/>

But when I use Elan-5.8, I am not able to export the annotation file in this format. I mean, I can export .xml file, but the content is quit different. Is there any way I can fit the elan-5.8’s result into this plugin?

thanks again :slight_smile:

On first sight the contents of their eaf/xml doesn’t look that different from what ELAN produces? It is an older version of the ELAN EAF format (2.6 where the current version is 3.0) and the File option “Save a Copy as EAF 2.7” is the closest option available in ELAN 5.8.

There are few things in the example file that are slightly different from what ELAN does: the MEDIA_URL attribute is a relative path where ELAN stores an absolute path and most/all id’s are in uppercase (TS0) where ELAN uses lowercase (ts0). I don’t know if any of these differences prevents loading in the plugin.

What actually happens when you try? Do you get an error message? Is either the waveform missing, or the annotations, or both?

Good morning, Han.

Good to know the EAF 2.7 is very close to that format. I was trying to feed EAF2.7 to that plugin. but it only process audio not video. So I got error like unable to decode audio data. But you give me the right direction. Much appreciated! :slight_smile: I will let you know when it works on video.