From b3e59b6128070ce22b06b7d12bd4ed5117a2cb35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Bla=C3=9F?= <michael.blass@uni-hamburg.de> Date: Fri, 23 Oct 2020 14:45:02 +0200 Subject: [PATCH] Added source_id property. --- src/apollon/audio.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/apollon/audio.py b/src/apollon/audio.py index 1500501..03a4537 100644 --- a/src/apollon/audio.py +++ b/src/apollon/audio.py @@ -72,6 +72,12 @@ class AudioFile: """Return (n_frames, n_channels).""" return self.n_frames, self.n_channels + """ + @property + def source_id(self) -> SourceId: + """""" + return SourceId(self._path.name.split('.')[0], self.hash) + """ def close(self) -> None: """Close the file.""" self._file.close() -- GitLab