def num_samples(self):
        """
        Return the total number of samples.
        """
        with audioread.audio_open(self.path) as f:
            return int(f.duration * f.samplerate)
Return the total number of samples.