Created
September 14, 2021 14:18
-
-
Save jamesb93/0a247a8fc230b3611de7e45fa796cfe8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
NUM_CHUNKS = 4 # or this could be a ratio of original data | |
raw_audio = np.array([1, 2, 3, 4, 5, 6, 7, 8]) | |
chunks = np.split(raw_audio, NUM_CHUNKS) | |
downsampled = [max(chunk) for chunk in chunks] | |
print(downsampled) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment