コード例 #1
0
ファイル: scribe.py プロジェクト: mathewjhan/notetaking-noah
    def split_by_silence(self):
        '''
        Uses the Splitter class to split the audio by silence
        to get the timestamps and respective filenames of the
        split segments.

        Segments is a list of tuples (filename, (start_time, end_time)).
        '''
        if (self.audio_extracted):
            splitter = Splitter(self.audio_file)
        else:
            raise Exception(
                "ERROR: File has not been extracted from video yet.")

        splitter.run()
        self.segments = splitter.get_segments()