diff --git a/tools/e2e_quality/audio/README b/tools/e2e_quality/audio/README index cbbff751f..5c8b6f85f 100644 --- a/tools/e2e_quality/audio/README +++ b/tools/e2e_quality/audio/README @@ -7,6 +7,10 @@ arguments, run_audio_test.py expects a pair of sinks named "capture" and default.pa file in ~/.pulse. Alternately, the "pacmd" commands therein can be run on the command-line to create the devices. +Similarly, place the provided daemon.conf file in ~/.pulse to use high quality +resampling in PulseAudio. This will reduce the resampling impact on the outcome +of the test. + Build all WebRTC targets as usual (or just the audio_e2e_harness target) to generate the VoiceEngine harness. diff --git a/tools/e2e_quality/audio/daemon.conf b/tools/e2e_quality/audio/daemon.conf new file mode 100644 index 000000000..26c4df4c8 --- /dev/null +++ b/tools/e2e_quality/audio/daemon.conf @@ -0,0 +1 @@ +resample-method = speex-float-9 diff --git a/tools/e2e_quality/audio/run_audio_test.py b/tools/e2e_quality/audio/run_audio_test.py index b32ac2513..d21865a89 100755 --- a/tools/e2e_quality/audio/run_audio_test.py +++ b/tools/e2e_quality/audio/run_audio_test.py @@ -55,8 +55,9 @@ def main(argv): # # We pass the render device for VoiceEngine to select because (for unknown # reasons) the virtual device is sometimes not used when the default. - retcode = subprocess.call(['pacmd', 'set-default-source', - options.play_sink + '.monitor'], stdout=subprocess.PIPE); + command = ['pacmd', 'set-default-source', options.play_sink + '.monitor'] + print ' '.join(command) + retcode = subprocess.call(command, stdout=subprocess.PIPE) if retcode != 0: return retcode @@ -65,7 +66,7 @@ def main(argv): print ' '.join(command) voe_proc = subprocess.Popen(command) - format_args = ['-n', '--format=s16le', '--rate=' + options.rate, + format_args = ['--format=s16le', '--rate=' + options.rate, '--channels=' + options.channels, '--raw'] command = (['pacat', '-p', '-d', options.play_sink] + format_args + [options.input]) @@ -75,7 +76,7 @@ def main(argv): # If recording starts before there is data available, pacat sometimes # inexplicably adds a large delay to the start of the file. We wait here in # an attempt to prevent that. - time.sleep(0.2) + time.sleep(2) command = (['pacat', '-r', '-d', options.rec_sink + '.monitor'] + format_args + [options.output]) print ' '.join(command)