webrtc/modules/audio_processing/test/conversational_speech
Artem Titov 6cae2d5513 Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
This reverts commit 3f87250a4f.

Reason for revert: Downstream is fixed

Original change's description:
> Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
>
> This reverts commit 5f0eb93d2a.
>
> Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after.
>
> Original change's description:
> > Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
> >
> > Bug: webrtc:13555, webrtc:13082
> > Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Artem Titov <titovartem@webrtc.org>
> > Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
> > Cr-Commit-Position: refs/heads/main@{#35805}
>
> TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:13555, webrtc:13082
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Owners-Override: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Andrey Logvin <landrey@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35807}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:13555, webrtc:13082
Change-Id: I7ef1ef3b6e3c41b1a96014aa75f003c0fcf33949
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249365
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35814}
2022-01-27 12:55:44 +00:00
..
BUILD.gn Remove from chromium build targets that are not compatible with it. 2021-02-01 13:46:19 +00:00
config.cc
config.h
generator.cc Use std::make_unique instead of absl::make_unique. 2019-09-17 15:47:29 +00:00
generator_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
mock_wavreader.cc Fully qualify googletest symbols. 2019-04-09 17:18:20 +00:00
mock_wavreader.h In common_audio/ and modules/audio_* replace mock macros with unified MOCK_METHOD macro 2020-05-20 13:17:31 +00:00
mock_wavreader_factory.cc Fully qualify googletest symbols. 2019-04-09 17:18:20 +00:00
mock_wavreader_factory.h In common_audio/ and modules/audio_* replace mock macros with unified MOCK_METHOD macro 2020-05-20 13:17:31 +00:00
multiend_call.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
multiend_call.h Remove RTC_DISALLOW_COPY_AND_ASSIGN from modules/ 2022-01-24 11:50:20 +00:00
OWNERS Remove wildcard ownership for build files. 2020-02-19 14:05:46 +00:00
README.md Change levels of different speech signal in tool. 2018-01-22 14:19:28 +00:00
simulator.cc Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" 2022-01-27 12:55:44 +00:00
simulator.h Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely" 2022-01-27 12:55:44 +00:00
timing.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
timing.h Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
wavreader_abstract_factory.h
wavreader_factory.cc Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
wavreader_factory.h Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
wavreader_interface.h Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00

Conversational Speech generator tool

Tool to generate multiple-end audio tracks to simulate conversational speech with two or more participants.

The input to the tool is a directory containing a number of audio tracks and a text file indicating how to time the sequence of speech turns (see the Example section).

Since the timing of the speaking turns is specified by the user, the generated tracks may not be suitable for testing scenarios in which there is unpredictable network delay (e.g., end-to-end RTC assessment).

Instead, the generated pairs can be used when the delay is constant (obviously including the case in which there is no delay). For instance, echo cancellation in the APM module can be evaluated using two-end audio tracks as input and reverse input.

By indicating negative and positive time offsets, one can reproduce cross-talk (aka double-talk) and silence in the conversation.

Example

For each end, there is a set of audio tracks, e.g., a1, a2 and a3 (speaker A) and b1, b2 (speaker B). The text file with the timing information may look like this:

A a1 0
B b1 0
A a2 100
B b2 -200
A a3 0
A a4 0

The first column indicates the speaker name, the second contains the audio track file names, and the third the offsets (in milliseconds) used to concatenate the chunks. An optional fourth column contains positive or negative integral gains in dB that will be applied to the tracks. It's possible to specify the gain for some turns but not for others. If the gain is left out, no gain is applied.

Assume that all the audio tracks in the example above are 1000 ms long. The tool will then generate two tracks (A and B) that look like this:

Track A

  a1 (1000 ms)
  silence (1100 ms)
  a2 (1000 ms)
  silence (800 ms)
  a3 (1000 ms)
  a4 (1000 ms)

Track B

  silence (1000 ms)
  b1 (1000 ms)
  silence (900 ms)
  b2 (1000 ms)
  silence (2000 ms)

The two tracks can be also visualized as follows (one characheter represents 100 ms, "." is silence and "*" is speech).

t: 0         1        2        3        4        5        6 (s)
A: **********...........**********........********************
B: ..........**********.........**********....................
                                ^ 200 ms cross-talk
        100 ms silence ^