Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/python/essentia/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,15 @@ def frame_times(self, sampleRate):
times.append((start + self.hopSize * i) / sampleRate)
return times

# Copy the docstring from FrameCutter and modify for FrameGenerator
docstr = default_fc.__doc__
docstr = docstr.replace('FrameCutter', 'FrameGenerator')
# change input name for consistency with class definition
docstr = docstr.replace('Inputs:\n\n [vector_real] signal', 'Inputs:\n\n [vector_real] audio')
docstr = docstr.replace('Outputs:\n\n [vector_real] frame - the frame to write to',
'Outputs:\n\n An iterator that returns each frame [vector_real] of the input audio.')
docstr = docstr[0:docstr.find('Description:')]
docstr += ('Description:\n\n ' + FrameGenerator.__struct__['description'])
setattr(FrameGenerator, '__doc__', docstr)

setattr(essentia, 'FrameGenerator', FrameGenerator)