fixed comments
This commit is contained in:
@@ -3,10 +3,9 @@ from .audio import AudioProcessor
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
|
|
||||||
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
||||||
|
|
||||||
|
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
||||||
test_waveform = torch.tensor([]).to(device)
|
TEST_WAVEFORM = torch.tensor([]).to(device)
|
||||||
TEST_SR = 16000
|
TEST_SR = 16000
|
||||||
SAMPLE_RATE = 16000
|
SAMPLE_RATE = 16000
|
||||||
NORMALIZATION_FACTOR = 32768
|
NORMALIZATION_FACTOR = 32768
|
||||||
@@ -43,11 +42,10 @@ def test_AudioProcessor_init(probe_audio_processor):
|
|||||||
def test_cut():
|
def test_cut():
|
||||||
"""Test for the test_cut Method for fixed parameters
|
"""Test for the test_cut Method for fixed parameters
|
||||||
"""
|
"""
|
||||||
waveform = torch.Tensor(10, 3)
|
|
||||||
sr = 16000
|
|
||||||
start = 4
|
start = 4
|
||||||
end = 7
|
end = 7
|
||||||
assert AudioProcessor(waveform, sr).cut(start, end).size() == int((end - start) * TEST_SR)
|
assert AudioProcessor(TEST_WAVEFORM, TEST_SR).cut(start, end).size() == int((end - start) * TEST_SR)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user