def audio_robustness(tests, noise_level=0.3, noises=None):
    if (noises == None):
        noises = [additive_white_gaussian_noise, audio_random_dropout, audio_structured_dropout]
    robustness_tests = np.zeros(tests.shape)
    for i in range(len(tests)):
        if (np.random.sample() <= noise_level):
            mode = np.random.randint(len(noises))
            robustness_tests[i] = noises[mode](tests[i], noise_level)
    return robustness_tests
def audio_robustness(tests, noise_level=0.3, noises=None):
    if (noises == None):
        noises = [additive_white_gaussian_noise, audio_random_dropout, audio_structured_dropout]
    robustness_tests = np.zeros(tests.shape)
    for i in range(len(tests)):
        if (np.random.sample() <= noise_level):
            mode = np.random.randint(len(noises))
            robustness_tests[i] = noises[mode](tests[i], noise_level)
    return robustness_tests