Skip to content

Commit

Permalink
removing print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocat93 committed Sep 26, 2024
1 parent 57b1203 commit 2a6438f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/senselab/audio/data_structures/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,17 @@ def window_generator(self, window_size: int, step_size: int) -> Generator["Audio
)

num_samples = self.waveform.size(-1)
print("num_samples:", num_samples)
current_position = 0

while current_position < num_samples:
print("current_position:", current_position)
# Calculate the end position of the window
end_position = current_position + window_size

# If the end_position exceeds the number of samples, take the remaining samples
# This is not necessary since it is done automatically when slicing tensors.
# However, it is more explicit.
if end_position > num_samples:
end_position = num_samples
print("end_position:", end_position)

# Get the windowed waveform
window_waveform = self.waveform[:, current_position:end_position]
Expand Down

0 comments on commit 2a6438f

Please sign in to comment.