pyannote / pyannote-database

Reproducible experimental protocols for multimedia (audio, video, text) database
MIT License
83 stars 28 forks source link

Using patterns for annotation files #62

Closed skubicius closed 4 years ago

skubicius commented 4 years ago

Is it possible to use patterns for .rttm locations? For example:

Protocols:
  MyDatabase:
    Protocol:
      MyProtocol:
        train:
            uri: lists/train.lst
            speaker: rttms/{uri}.rttm
hbredin commented 4 years ago

Yes, see the documentation here. Use the _ prefix to turn a path into a template:

Protocols:
  MyDatabase:
    Protocol:
      MyProtocol:
        train:
            uri: lists/train.lst
            speaker: _rttms/{uri}.rttm
hbredin commented 4 years ago

I'd gladly merge a PR that removes the need for this _ prefix.

See https://stackoverflow.com/questions/4839121/check-if-a-string-to-interpolate-provides-expected-placeholders for a possible way to do it.

hbredin commented 4 years ago

I opened issue #63 to keep track of this future improvement.