Skip to content
Snippets Groups Projects
Commit ab2859dc authored by Stephane Chavin's avatar Stephane Chavin
Browse files

correct create_spectrogram function

parent a2fc43af
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@ def create_spectrogram(sig, directory, names, cmap, minimum, window_size=1024, o
:param overlap (float): Ratio of overlapping samples between each window (default 50%).
"""
if overlap >= 1:
hop = window - overlap
hop = window_size - overlap
print(f'You put a hop value over 1. This has been corrected to have {overlap} as overlap size between window')
else:
hop = window_size * (1-overlap) # As hop length is the number of audio samples between adjacent STFT columns
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment