Spaces:
Runtime error
Runtime error
Hendrik Schroeter
commited on
Commit
•
2721e55
1
Parent(s):
5e58c6e
add print
Browse files
app.py
CHANGED
@@ -36,6 +36,7 @@ def mix_at_snr(clean, noise, snr, eps=1e-10):
|
|
36 |
noise = noise.repeat((1, int(math.ceil(clean.shape[1] / noise.shape[1]))))
|
37 |
max_start = int(noise.shape[1] - clean.shape[1])
|
38 |
start = torch.randint(0, max_start, ()).item()
|
|
|
39 |
noise = noise[:, start : start + clean.shape[1]]
|
40 |
E_speech = torch.mean(clean.pow(2)) + eps
|
41 |
E_noise = torch.mean(noise.pow(2))
|
|
|
36 |
noise = noise.repeat((1, int(math.ceil(clean.shape[1] / noise.shape[1]))))
|
37 |
max_start = int(noise.shape[1] - clean.shape[1])
|
38 |
start = torch.randint(0, max_start, ()).item()
|
39 |
+
print("start:", start, clean.shape)
|
40 |
noise = noise[:, start : start + clean.shape[1]]
|
41 |
E_speech = torch.mean(clean.pow(2)) + eps
|
42 |
E_noise = torch.mean(noise.pow(2))
|