Skip to content

praat2yaml.pl fails

Hi and thank you for sharing these scripts. I am running praat2yaml.pl on a file exported from ELAN and it fails, but I cannot understand exactly where the problem is. The message I get is this:

Uncaught exception from user code: YAML::XS::Load Error: The problem:

  could not find expected ':'

was found at document: 1, line: 14, column: 17 while scanning a simple key at line: 13, column: 9

and when using the --debug option the first few lines I get are:

Object class: TextGrid
xmin: 0.0
xmax: 69.172
tiers:
    size: 6
    item:
        item[1]:
        class: "IntervalTier"
        name: "Character"
        xmin: 0.0
        xmax: 69.172
        intervals:
        intervals [1]
            xmin: 0.0
            xmax: 0.19
            text: ""
        intervals [2]
            xmin: 0.19
            xmax: 1.23
            text: "Κωνσταντίνος Καραμανλής / Εργολάβος"
        intervals [3]
            xmin: 1.23
            xmax: 1.72
            text: ""
        intervals [4]
            xmin: 1.72
            xmax: 9.79
            text: "Ανδρέας Παπανδρέου"

I suspect that the YAML parser on line 202 expects the intervals [1] to end with an :. Would that be plausible? The original file from ELAN does not include a :. Any ideas where I can dig deeper?