def duration_in_s(self) -> float: try: return librosa.get_duration(filename=str(self.audio_file)) except Exception as e: log("Failed to get duration of {}: {}".format(self.audio_file, e)) return 0