def generate_frames_as_segments(self, frame_duration_ms, zero_pad=True):
for frame in self.generate_frames(frame_duration_ms, zero_pad=zero_pad):<EOL><INDENT>seg = AudioSegment(pydub.AudioSegment(data=frame.bytes, sample_width=self.sample_width,<EOL>frame_rate=self.frame_rate, channels=self.channels), self.name)<EOL>yield seg, frame.timestamp<EOL><DEDENT>
Does the same thing as `generate_frames`, but yields tuples of (AudioSegment, timestamp) instead of Frames.