Confirmed users
35
edits
No edit summary |
No edit summary |
||
| Line 55: | Line 55: | ||
[[File:AudioPerf-Setup.png|650px]] | [[File:AudioPerf-Setup.png|650px]] | ||
The idea here is to compute PESQ scores between the input audio file fed into the local Peer Connection and | <p>The idea here is to setup 2 Peer Connections within a single instance of the browser tab to setup a one-way audio call | ||
output audio audio file recorded at the play-out of the remote Peer Connection in a fully automated fashion. | .Finally compute PESQ scores between the input audio file fed into the local Peer Connection and | ||
Following sub-sections explain in details the | the output audio audio file recorded at the play-out of the remote Peer Connection in a fully automated fashion.</p> | ||
=== | |||
Following sub-sections explain in details the steps involved for this purpose | |||
=== Running Browser Based Media Test Automatically === | |||
<p>[[Talos]] is Mozilla's python performance testing framework that is usable on Windows, Mac and Linux. | <p>[[Talos]] is Mozilla's python performance testing framework that is usable on Windows, Mac and Linux. | ||
Talos provides automated way to start/stop Firefox , perform tests and capture results to be reported to the Mozilla's graphing server across various Firefox builds.</p> | Talos provides automated way to start/stop Firefox , perform tests and capture results to be reported to the Mozilla's graphing server across various Firefox builds.</p> | ||
<p>Talos is used in our setup to run media tests along with other start-up and page-loader performance tests.</p> | <p>Talos is used in our setup to run media tests along with other start-up and page-loader performance tests.</p> | ||
=== | === Feeding output of <audio> to the Peer Connection === | ||
<p>Once we have the framework figured out to run automated media-tests, the next step is deciding on how do we insert | <p>Once we have the framework figured out to run automated media-tests, the next step is deciding on how do we insert | ||
input audio file into the WebRTC Peer Connection.</p> | input audio file into the WebRTC Peer Connection.</p> | ||
| Line 76: | Line 78: | ||
</code> | </code> | ||
<br> | <br> | ||
=== | === Record, Cleanup and Compute PESQ === | ||
<p>From the previous 2 sub-sections we have the following <br> | <p>From the previous 2 sub-sections we have the following <br> | ||
*A way to run automated browser tests using Talos | *A way to run automated browser tests using Talos | ||
*A way a feeding audio from an input audio file audio input to the Peer Connection without having to use the GetUserMedia() API | *A way a feeding audio from an input audio file audio input to the Peer Connection without having to use the GetUserMedia() API | ||
</p> | </p> | ||
<p>PulseAudio's | <p This sub-section explains various tools used to choose the right audio sink, record the audio played out and compute | ||
<p> PulseAudio's parec tool | PESQ scores </p> | ||
<p>PulseAudio's pactl tool is used to find the right sink to play-out the audio produced by the remote Peer Connection.</p> | |||
<p> Finally PESQ is used to compute the quality scores between the input audio file (original) and the output audio file (recorded) </p> | <p>PulseAudio's parec tool records mono channel audio played out at the sink in Signed Little Ending format at 16000 samples/sec. <br> | ||
The output from the SOX tool is fed into SOX tool to generate .WAV version of the recorded audio and to trim silence at the beginning and end of the recorded audio file. <br> | |||
<code> | |||
Command: | |||
parec -r -d <recording device> --format=s16le -c 1 -r 16000 | sox -t raw -r 16000 -sLb 16 -c 1 - <output audio file> trim 0 <record-duration> | |||
</code> | |||
<br> | |||
The recording is timed to match the length of the input audio file using SOX's trimming effects. | |||
</p> | |||
<p>Finally PESQ is used to compute the quality scores between the input audio file (original) and the output audio file (recorded) <br> | |||
<code> | |||
Command: | |||
PESQ +16000 <input-audio-file> <output-audio-file> | |||
</code> | |||
</p> | |||
=== Open Issues === | === Open Issues === | ||