We use Optional in our public API, so its header should be in
webrtc/api/.
BUG=webrtc:8205
Review-Url: https://codereview.webrtc.org/3011943002
Cr-Commit-Position: refs/heads/master@{#19693}
We use ArrayView in our public API, so its header should be in
webrtc/api/.
BUG=none
Review-Url: https://codereview.webrtc.org/3007763002
Cr-Commit-Position: refs/heads/master@{#19658}
This CL contains automatically applied fixes suggested by the
ClangTidy analyzer (http://clang.llvm.org/extra/clang-tidy/). The
following kinds of fixes is present:
* renaming variables when the names in the method signature don't
match the names in the method definition
(ClangTidy:readability-inconsistent-declaration-parameter-name)
* ClangTidy:readability-container-size-empty,
ClangTidy:misc-unused-using-decls,
ClangTidy:performance-unnecessary-value-param,
ClangTidy:readability-redundant-control-flow
This is a 'pilot' CL to check if automatic code analyzers can
feasibly be integrated into the WebRTC infrastructuve.
The renamings have been manually expected for consistency with
surrounding code. In echo_cancellation.cc, I changed several names in
the function implementation to match the function declaration. The
tool suggested changing everything to match the function definitions
instead.
Bug: None
Change-Id: Id3b7ba18c51f15b025f26090c7bdcc642e48d8fd
Reviewed-on: https://chromium-review.googlesource.com/635766
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19630}
If the input file name matches the "<name>-<params>.wav" pattern and <name> is a valid signal creator name, then <params> is parsed and used to create a new signal which is written in place of the missing file.
This CL only adds a pure tone creator. For instance, 'pure_tone-440_1000.wav' creates a pure tone at 440 Hz, 1000 ms long, mono, sampled at 48kHz.
This feature can be used to simplify the creation of common probe signals - no need to add external .wav files. Also, it will be exploited by a coming CL that adds a new evaluation score requiring the input signal to be a pure tone.
Additional minor fixes:
- apm_quality_assessment_unittest.py: command line arguments replaced to avoid that those for the unit test framework are passed
- simulation_unittest.py: invalid evaluation score name replaced
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2989823002
Cr-Commit-Position: refs/heads/master@{#19200}
- render stream support, required to assess AEC;
- echo path simulation and input mixer, to generate echo and add it to the
speech signal;
- export engine: improved UI, switch to Pandas DataFrames;
- minor design improvements and needed adaptions.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2813883002
Cr-Commit-Position: refs/heads/master@{#19198}
All downstream code have been updated to the new location.
In PRESUBMIT.py:
* Remove webrtc/rtc_base from CPP_BLACKLIST
* Add webrtc/rtc_base to LEGACY_API_DIRS
Fix some duplicated paths in
webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
BUG=webrtc:7634
TBR=kwiberg@webrtc.org
Review-Url: https://codereview.webrtc.org/2976293002
Cr-Commit-Position: refs/heads/master@{#19094}
All downstream code have been updated to the new location.
In PRESUBMIT.py:
* Remove webrtc/rtc_base from CPP_BLACKLIST
* Add webrtc/rtc_base to LEGACY_API_DIRS
Fix some duplicated paths in
webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
BUG=webrtc:7634
TBR=kwiberg@webrtc.org
Review-Url: https://codereview.webrtc.org/2973183002
Cr-Commit-Position: refs/heads/master@{#18948}
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`
The only manual edit is to add an include of webrtc/rtc_base/checks.h in
webrtc/modules/audio_device/android/opensles_common.h, which likely
was needed due to changed include paths due to 'git cl format'.
BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True
Review-Url: https://codereview.webrtc.org/2969653002
Cr-Commit-Position: refs/heads/master@{#18871}
The following changes have been made:
- command line args wired,
- user output added,
- final polishing.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2808053002
Cr-Commit-Position: refs/heads/master@{#18609}
Reason for revert:
Build file causing google3 compilation error fixed
Original issue's description:
> Revert of Conversational speech tool, simualtor + unit tests (patchset #12 id:220001 of https://codereview.webrtc.org/2790933002/ )
>
> Reason for revert:
> Compile Error.
>
> Original issue's description:
> > The simulator puts into action the schedule of speech turns encoded in a MultiEndCall instance. The output is a set of audio track pairs. There is one set for each speaker and each set contains one near-end and one far-end audio track. The tracks are directly written into wav files instead of creating them in memory. To speed up the creation of the output wav files, *all* the source audio tracks (i.e., the atomic speech turns) are pre-loaded.
> >
> > The ConversationalSpeechTest.MultiEndCallSimulator unit test defines a conversational speech sequence and creates two wav files (with pure tones at 440 and 880 Hz) that are used as atomic speech turn tracks.
> >
> > This CL also patches MultiEndCall in order to allow input audio tracks with same sample rate and single channel only.
> >
> > BUG=webrtc:7218
> >
> > Review-Url: https://codereview.webrtc.org/2790933002
> > Cr-Commit-Position: refs/heads/master@{#18480}
> > Committed: 6b648c4697
>
> TBR=minyue@webrtc.org,alessiob@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7218
>
> Review-Url: https://codereview.webrtc.org/2925123003
> Cr-Commit-Position: refs/heads/master@{#18481}
> Committed: 4c72cf43dfTBR=minyue@webrtc.org,charujain@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2930853002
Cr-Commit-Position: refs/heads/master@{#18606}
Currently the debug dump functionality of WebRTC (a log of all
AudioProcessing operations) was tested by the following tests:
1. ApmTest.VerifyDebugDump* which configures and runs AudioProcessing
from a debug dump, and verifies that the same debug dump is
recorded.
2. DebugDumpTest.* which is a comprehensive test of the debug dump
operations. AudioProcessing configuration is changed, and the dump
is scanned for the change.
3. ApmTest::{DebugDump, DebugDumpFromFileHandle} that verify that
debug dumping can be started and files written.
This CL replaces the debug dump mechanism in all these tests to
webrtc::AecDump. Some of the tests are adapted to the chenges of the
new API to AecDump {Start,Stop}DebugRecording: the old functions
signal errors when a file cannot be opened. With AecDump, the
AecDumpFactory instead returns a nullptr.
The CL also changes audioproc_f to use AecDump.
BUG=webrtc:7404
Review-Url: https://codereview.webrtc.org/2864373002
Cr-Commit-Position: refs/heads/master@{#18605}
const int16_t* data() const;
int16_t* mutable_data();
- data() returns a zeroed static buffer on muted frames (to avoid unnecessary zeroing of the member buffer) and directly returns AudioFrame::data_ on unmuted frames.
- mutable_data(), lazily zeroes AudioFrame::data_ if the frame is currently muted, sets muted=false, and returns AudioFrame::data_.
These accessors serve to "force" callers to be aware of the mute state field, i.e. lazy zeroing is not the primary motivation.
This change only optimizes handling of muted frames where it is somewhat trivial to do so. Other improvements requiring more significant structural changes will come later.
BUG=webrtc:7343
TBR=henrika
Review-Url: https://codereview.webrtc.org/2750783004
Cr-Commit-Position: refs/heads/master@{#18543}
Reason for revert:
Compile Error.
Original issue's description:
> The simulator puts into action the schedule of speech turns encoded in a MultiEndCall instance. The output is a set of audio track pairs. There is one set for each speaker and each set contains one near-end and one far-end audio track. The tracks are directly written into wav files instead of creating them in memory. To speed up the creation of the output wav files, *all* the source audio tracks (i.e., the atomic speech turns) are pre-loaded.
>
> The ConversationalSpeechTest.MultiEndCallSimulator unit test defines a conversational speech sequence and creates two wav files (with pure tones at 440 and 880 Hz) that are used as atomic speech turn tracks.
>
> This CL also patches MultiEndCall in order to allow input audio tracks with same sample rate and single channel only.
>
> BUG=webrtc:7218
>
> Review-Url: https://codereview.webrtc.org/2790933002
> Cr-Commit-Position: refs/heads/master@{#18480}
> Committed: 6b648c4697TBR=minyue@webrtc.org,alessiob@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2925123003
Cr-Commit-Position: refs/heads/master@{#18481}
The ConversationalSpeechTest.MultiEndCallSimulator unit test defines a conversational speech sequence and creates two wav files (with pure tones at 440 and 880 Hz) that are used as atomic speech turn tracks.
This CL also patches MultiEndCall in order to allow input audio tracks with same sample rate and single channel only.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2790933002
Cr-Commit-Position: refs/heads/master@{#18480}
split domain and only implements floating point operations (to avoid spectral
leakage issues and unnecessary complexity).
The goal of this CL is adding the new sub-module into APM without providing an
implementation that could replace the existing gain control modules. The focus
is in fact on initialization, reset, and configuration of AGC2.
The module itself only applies a hard-coded gain value. This behavior will
change in the coming CLs.
BUG=webrtc:7494
Review-Url: https://codereview.webrtc.org/2848593002
Cr-Commit-Position: refs/heads/master@{#18222}
- BUILD file reorganized, unit tests now have dedicated targets.
- "fake_polqa" is a binary producing fake output in the same format of PolqaOem64; the binary is injected for unit tests instead of the actual POLQA tool.
- Minor refactoring to inject the path to the POLQA binary instead of its parent folder.
- Unit tests for the evaluation score workers.
- Unit tests for the ApmModuleSimulator class.
- Unit tests for the test data generators: ReverberationTestDataGenerator added.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2811953002
Cr-Commit-Position: refs/heads/master@{#17674}
This CL changes the name of classes, methods and variables making using "noise generator".
This naming is replaced with "input-reference generator" which is more descriptive of the actual role.
Comments, CSS class and HTML item names have also been changed.
Consistency for variable names has been verified and the style checked with pylint.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2805653002
Cr-Commit-Position: refs/heads/master@{#17639}
The unit test ConversationalSpeechTest.MultiEndCallWavReaderAdaptorSine uses CreateSineWavFile() and writes temporary wav files that are used for test (deleted only if the test passes).
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2774423005
Cr-Commit-Position: refs/heads/master@{#17608}
This CL includes extensive tests to match accept or reject decisions on several different timing setups. The setups are simulated using mocks (by far more light-weight than using actual timing and audio track files).
The client code, the unit tests in this case, passes information about the fake audio tracks to MockWavReaderFactory. MockWavReader instances are then created using the parameters defined in the client code. To improve the readability of the tests, generator_unittest.cc includes a docstring explaining how each MultiEndCallSetup* test is documented.
Run tests as follows:
$ out/Default/modules_unittests --gtest_filter=ConversationalSpeechTest.*
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2781573002
Cr-Commit-Position: refs/heads/master@{#17592}
Reason for revert:
Trying to re-land after solving some related issues.
There are no changes compared to the original CL.
Original issue's description:
> Revert of Loosening the coupling between WebRTC and //third_party/protobuf (patchset #16 id:300001 of https://codereview.webrtc.org/2747863003/ )
>
> Reason for revert:
> I will try to reland next week because it is causing some problems.
>
> Original issue's description:
> > To accommodate some downstream WebRTC users we need to loosen
> > the coupling between our code and the //third_party/protobuf.
> >
> > This includes using typedefs to define strings instead of
> > assuming std::string.
> >
> > After this refactoring it will be possible to link with other
> > protobuf implementations than the current one.
> >
> > We moved the PRESUBMIT check to another CL [1]. The goal of this
> > presubmit is to avoid the direct usage of google::protobuf outside
> > of the webrtc/base/protobuf_utils.h header file.
> >
> > [1] - https://codereview.webrtc.org/2753823003/
> >
> > BUG=webrtc:7340
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2747863003
> > Cr-Commit-Position: refs/heads/master@{#17466}
> > Committed: 16ab93b952
>
> TBR=kjellander@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org,michaelt@webrtc.org,peah@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:7340
>
> Review-Url: https://codereview.webrtc.org/2786363002
> Cr-Commit-Position: refs/heads/master@{#17483}
> Committed: d00aad5eb2TBR=kjellander@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org,michaelt@webrtc.org,peah@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7340
NOTRY=True
Review-Url: https://codereview.webrtc.org/2791963003
Cr-Commit-Position: refs/heads/master@{#17584}
This CL adds major render pipeline changes to the AEC3 code. The reason
for these are that
1) It allows the echo removal unit to receive information about the content
in bands beyond band 0, thereby allowing removal of high-frequency
echoes
2) It allows more controlled handling of the render buffers, allowing proper
buffer behaviour during capture glitches and clock-drift.
Unfortunately, the render pipeline caused a lot of related changes in much
of the rest of the AEC3 files. Most of these are, however, caused by
a change of class name.
Another unfortunate effect of this CL, is that a number of unittest cease to
compile. I chose to temporarily solve that by removing them from the
build using #if/#endif. The reason for that is that those will anyway again
need to be changed in the next review, and doing like this avoids them
having to be reviewed twice.
BUG=webrtc:6018
Review-Url: https://codereview.webrtc.org/2784023002
Cr-Commit-Position: refs/heads/master@{#17547}
- snake_case -> CapWords
- compulsory docstring added
- style
A followup CL will fix remaining issues as raised by the next version of the WebRTC Python linter (update in progress).
BUG=webrtc:7218
NOTRY=True
Review-Url: https://codereview.webrtc.org/2793903006
Cr-Commit-Position: refs/heads/master@{#17543}
Reason for revert:
Issue with rebasing from depending CL
Original issue's description:
> Export library that generates an HTLM file with the scores organized in tables.
>
> BUG=webrtc:7218
> NOTRY=True
>
> Review-Url: https://codereview.webrtc.org/2717973006
> Cr-Commit-Position: refs/heads/master@{#17512}
> Committed: 29e3330139TBR=aleloi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2791293002
Cr-Commit-Position: refs/heads/master@{#17513}
This CL also includes the implementation of the echo noise generator.
I added comments in the diff to help the reviewers.
BUG=webrtc:7218
NOTRY=True
Review-Url: https://codereview.webrtc.org/2715233003
Cr-Commit-Position: refs/heads/master@{#17507}
Reason for revert:
I will try to reland next week because it is causing some problems.
Original issue's description:
> To accommodate some downstream WebRTC users we need to loosen
> the coupling between our code and the //third_party/protobuf.
>
> This includes using typedefs to define strings instead of
> assuming std::string.
>
> After this refactoring it will be possible to link with other
> protobuf implementations than the current one.
>
> We moved the PRESUBMIT check to another CL [1]. The goal of this
> presubmit is to avoid the direct usage of google::protobuf outside
> of the webrtc/base/protobuf_utils.h header file.
>
> [1] - https://codereview.webrtc.org/2753823003/
>
> BUG=webrtc:7340
> NOTRY=True
>
> Review-Url: https://codereview.webrtc.org/2747863003
> Cr-Commit-Position: refs/heads/master@{#17466}
> Committed: 16ab93b952TBR=kjellander@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org,michaelt@webrtc.org,peah@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7340
Review-Url: https://codereview.webrtc.org/2786363002
Cr-Commit-Position: refs/heads/master@{#17483}
the coupling between our code and the //third_party/protobuf.
This includes using typedefs to define strings instead of
assuming std::string.
After this refactoring it will be possible to link with other
protobuf implementations than the current one.
We moved the PRESUBMIT check to another CL [1]. The goal of this
presubmit is to avoid the direct usage of google::protobuf outside
of the webrtc/base/protobuf_utils.h header file.
[1] - https://codereview.webrtc.org/2753823003/
BUG=webrtc:7340
NOTRY=True
Review-Url: https://codereview.webrtc.org/2747863003
Cr-Commit-Position: refs/heads/master@{#17466}
The command
tools/checklicenses/checklicenses.py --ignore-suppressions ./webrtc
previously produced this output:
'webrtc/modules/audio_processing/test/apmtest.m' has non-whitelisted license 'UNKNOWN'
'webrtc/modules/audio_processing/transient/test/readDetection.m' has non-whitelisted license 'UNKNOWN'
'webrtc/modules/audio_processing/transient/test/readPCM.m' has non-whitelisted license 'UNKNOWN'
...
This CL adds the WebRTC licence with appropriate year to all our
MATLAB files. All these files were contributed by WebRTC project
members hlundin@, pbos@, niklase@.
BUG=chromium:98592
NOTRY=True
Review-Url: https://codereview.webrtc.org/2781663005
Cr-Commit-Position: refs/heads/master@{#17428}
The class creates one WavReaderInterface object for each unique audiotrack and builds the set of speaker names.
Validating if the audiotrack lengths and the timing information are compatible (and hence valid) is not implemented yet.
MultiEndCall is designed using dependency injection. This allows to use mock objects with which we can quickly simulate different timings and track lengths without needing actual wav files.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2761853002
Cr-Commit-Position: refs/heads/master@{#17421}
The ConversationalSpeechTest.* unit tests are now part of modules_unittests.
The rtc_test target has been replaced with an rtc_source_set one.
The latter is included as dependency in audio_processing_unittests.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2769863005
Cr-Commit-Position: refs/heads/master@{#17360}
The conversational_speech::Timing class models a list of turns.
Each turn, is identified by a speaker, the audiotrack name, and an offset in milliseconds.
The unit test checks that an instance of Timing is correctly populated and that save/reload leads to the same data.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2750353002
Cr-Commit-Position: refs/heads/master@{#17346}
The results of the echo detector complexity tests are currently notoriously spiky and unreliable. The following improvements are made in this CL:
- Significantly longer warmup time before starting the test
- More iterations and larger batches
- Different number of iterations for slow and fast tests
- Use the echo likelihood in the test so it cannot get optimized out
BUG=webrtc:7353
Review-Url: https://codereview.webrtc.org/2750413002
Cr-Commit-Position: refs/heads/master@{#17303}
Test for the conversational_speech::Config class and renaming.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2749573002
Cr-Commit-Position: refs/heads/master@{#17301}
generation."
This CL removes the Python script and adds its C++ porting.
The former was in its early stage and it has permanently been removed.
This is a reland of https://codereview.webrtc.org/2740063004/ which
was reverted. Now the build errors are fixed.
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2752793002
Cr-Commit-Position: refs/heads/master@{#17300}
Reason for revert:
Even if the conversational speech tool is external and not a core part of webrtc, there are too many trybots failing.
Original issue's description:
> C++ porting of the initial python script for conversational speech generation.
>
> This CL removes the Python script and adds its C++ porting.
> The former was in its early stage and it has permanently been removed.
>
> BUG=webrtc:7218
> NOTRY=True
>
> Review-Url: https://codereview.webrtc.org/2740063004
> Cr-Commit-Position: refs/heads/master@{#17254}
> Committed: 0cf3aa6d0dTBR=henrik.lundin@webrtc.org,kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7218
Review-Url: https://codereview.webrtc.org/2753843002
Cr-Commit-Position: refs/heads/master@{#17257}
This CL removes the Python script and adds its C++ porting.
The former was in its early stage and it has permanently been removed.
BUG=webrtc:7218
NOTRY=True
Review-Url: https://codereview.webrtc.org/2740063004
Cr-Commit-Position: refs/heads/master@{#17254}