blob: 022ea81284b86e6a2d809545c739c3e8e0cb537d [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.quiet_env"
METADATA = {
"contacts": ["chromeos-audio-sw@google.com"],
"bug_component": "b:875558",
"criteria": "This test will fail if captured audio quality is degraded by NC in a quiet place.",
"doc" : """
This test checks if the speech quality is not degraded by NC when
the input is clean. During the test, the speech file will be 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
# The speech file is 15-second, 1-channel, 16k-rate.
# The threshold is negative because we can tolerate the slight degradation as the side effect
# of NC.
test_data = dict(speech_file='speech_ref.wav',
threshold=-0.05)
def run(machine):
host = hosts.create_host(machine, chameleon_args=chameleon_args)
job.run_test("audio_AudioNoiseCancellation", host=host, test_data=test_data, tag='quiet_env')
parallel_simple(run, machines)