Improve the reliablity of the audio e2e test.
- Use higher quality resampling. - Add a longer delay before pacat recording. TBR=kjellander@webrtc.org BUG=issue502 TEST=manually Review URL: https://webrtc-codereview.appspot.com/646005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2374 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -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
|
default.pa file in ~/.pulse. Alternately, the "pacmd" commands therein can be
|
||||||
run on the command-line to create the devices.
|
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
|
Build all WebRTC targets as usual (or just the audio_e2e_harness target) to
|
||||||
generate the VoiceEngine harness.
|
generate the VoiceEngine harness.
|
||||||
|
|
||||||
|
|||||||
1
tools/e2e_quality/audio/daemon.conf
Normal file
1
tools/e2e_quality/audio/daemon.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
resample-method = speex-float-9
|
||||||
@@ -55,8 +55,9 @@ def main(argv):
|
|||||||
#
|
#
|
||||||
# We pass the render device for VoiceEngine to select because (for unknown
|
# We pass the render device for VoiceEngine to select because (for unknown
|
||||||
# reasons) the virtual device is sometimes not used when the default.
|
# reasons) the virtual device is sometimes not used when the default.
|
||||||
retcode = subprocess.call(['pacmd', 'set-default-source',
|
command = ['pacmd', 'set-default-source', options.play_sink + '.monitor']
|
||||||
options.play_sink + '.monitor'], stdout=subprocess.PIPE);
|
print ' '.join(command)
|
||||||
|
retcode = subprocess.call(command, stdout=subprocess.PIPE)
|
||||||
if retcode != 0:
|
if retcode != 0:
|
||||||
return retcode
|
return retcode
|
||||||
|
|
||||||
@@ -65,7 +66,7 @@ def main(argv):
|
|||||||
print ' '.join(command)
|
print ' '.join(command)
|
||||||
voe_proc = subprocess.Popen(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']
|
'--channels=' + options.channels, '--raw']
|
||||||
command = (['pacat', '-p', '-d', options.play_sink] + format_args +
|
command = (['pacat', '-p', '-d', options.play_sink] + format_args +
|
||||||
[options.input])
|
[options.input])
|
||||||
@@ -75,7 +76,7 @@ def main(argv):
|
|||||||
# If recording starts before there is data available, pacat sometimes
|
# 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
|
# inexplicably adds a large delay to the start of the file. We wait here in
|
||||||
# an attempt to prevent that.
|
# an attempt to prevent that.
|
||||||
time.sleep(0.2)
|
time.sleep(2)
|
||||||
command = (['pacat', '-r', '-d', options.rec_sink + '.monitor'] +
|
command = (['pacat', '-r', '-d', options.rec_sink + '.monitor'] +
|
||||||
format_args + [options.output])
|
format_args + [options.output])
|
||||||
print ' '.join(command)
|
print ' '.join(command)
|
||||||
|
|||||||
Reference in New Issue
Block a user