IPS-LMU / EMU-webApp

The EMU-webApp is an online and offline web application for labeling, visualizing and correcting speech and derived speech data.
http://ips-lmu.github.io/EMU-webApp/
MIT License
51 stars 14 forks source link

snap to zero crossing does not work on rightmost non-MAUS generated Segment levels #267

Closed kirbyj closed 4 years ago

kirbyj commented 4 years ago

Cf. #265.

This appears to be because there isn't a rightmost boundary to snap to anything.

Consider:

Screen Shot 2019-12-05 at 10 42 03 PM

Note that on the first (PHO) level (which was generated by MAUS) the duration of the final segment (labeled ) is indicated in the lower right-hand corner. For the ORL level, there is no such information. And there is no black boundary descending from the top of the right edge of the final segment of the ORL level (labelled o, here).

In this way, it makes sense that x doesn't work on this boundary, because it's not really a boundary. But why not? This is what happens when you create segment on a Segment level by selecting a region of a file and hitting ENTER: you get a left boundary, but not a right one. Yet MAUS-generated Levels display the 'expected' behavior.

I did have a cursory look through the *annot.json files but couldn't see anything obviously different in the JSON of the two levels.

raphywink commented 4 years ago

"But why not?"

because I am an idiot that is why :-) I overlooked that in this one case the search function that detects the nearest zero crossing needs to get the sampleStart + sampleDur value of that annotation item and not the sampleStart value as an input.

raphywink commented 4 years ago

see https://github.com/IPS-LMU/EMU-webApp/commit/0fdc782bf2fd56f77c5f172821d6e236344ea698 (had wrong number in commit message to auto-close this issue)

kirbyj commented 4 years ago

thanks, glad it was a simple fix!