blob: ff11a0ed231718787c154a23d42d3bc1348534d4 [file] [log] [blame]
# Copyright 2021 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from autotest_lib.server import utils
NAME = "audio_AudioNoiseCancellation.noisy_env"
METADATA = {
"contacts": ["chromeos-audio-sw@google.com"],
"bug_component": "b:875558",
"criteria": "This test will fail if captured audio does not reduce noise from the input",
"doc" : """
This test checks if the speech quality is improved by NC when the
input is mixed with noises. During the test, the speech and noise
files will be mixed and played by Chameleon, while DUT records via
the internal mic with NC enabled and disabled respectively. The
score difference calculated by ViSQOL with the speech file as
reference should not be less than the threshold specified in
test_data.
"""
}
TEST_TYPE = "server"
# ATTRIBUTES = "suite:audio_advanced"
DEPENDENCIES = "board:volteer, audio_box, chameleon_state:WORKING"
JOB_RETRIES = 1
args_dict = utils.args_to_dict(args)
chameleon_args = hosts.CrosHost.get_chameleon_arguments(args_dict)
# Test files are located in gs://chromeos-localmirror/distfiles/test_noise_cancellation
# Both files are 15-second, 1-channel, 16k-rate.
test_data = dict(speech_file='speech_ref.wav',
noise_file='office_noise.wav',
threshold=0.1)
def run(machine):
host = hosts.create_host(machine, chameleon_args=chameleon_args)
job.run_test("audio_AudioNoiseCancellation", host=host, test_data=test_data, tag='noisy_env')
parallel_simple(run, machines)