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 | |
import matplotlib.pyplot as plt | |
from matplotlib.widgets import Slider, Button, RadioButtons | |
import librosa | |
fig, ax = plt.subplots() | |
plt.subplots_adjust(left=0.1, bottom=0.35) | |
samples = 1 | |
audio, sr = librosa.core.load("Snare.wav") # load your audio here |
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 torch | |
from torch import nn | |
def convBlock(inc, outc, ksz, conv_or_deconv): | |
return nn.Sequential( | |
nn.Conv2d(in_channels=inc, out_channels=outc, kernel_size=ksz, | |
stride=2) if conv_or_deconv else nn.ConvTranspose2d(in_channels=inc, out_channels=outc, | |
kernel_size=ksz, stride=2), | |
nn.LeakyReLU(), | |
nn.BatchNorm2d(num_features=outc) |
NewerOlder