/* * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
class VadImpl final : public Vad { public: explicit VadImpl(Aggressiveness aggressiveness)
: handle_(nullptr), aggressiveness_(aggressiveness) {
Reset();
}
~VadImpl() override { WebRtcVad_Free(handle_); }
Activity VoiceActivity(const int16_t* audio,
size_t num_samples, int sample_rate_hz) override { int ret = WebRtcVad_Process(handle_, sample_rate_hz, audio, num_samples); switch (ret) { case 0: return kPassive; case 1: return kActive; default:
RTC_DCHECK_NOTREACHED() << "WebRtcVad_Process returned an error."; return kError;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.