chromium/components/speech/endpointer/endpointer_unittest.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/speech/endpointer/endpointer.h"

#include <stdint.h>

#include "base/memory/raw_ptr.h"
#include "base/types/fixed_array.h"
#include "components/speech/audio_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace {
const int kFrameRate =;     // 20 ms long frames for AMR encoding.
}  // namespace

namespace speech {

class FrameProcessor {};

void RunEndpointerEventsTest(FrameProcessor* processor, int sample_rate) {}

// This test instantiates and initializes a stand alone endpointer module.
// The test creates FrameData objects with random noise and send them
// to the endointer module. The energy of the first 50 frames is low,
// followed by 500 high energy frames, and another 50 low energy frames.
// We test that the correct start and end frames were detected.
class EnergyEndpointerFrameProcessor : public FrameProcessor {};

TEST(EndpointerTest, TestEnergyEndpointerEvents) {}

// Test endpointer wrapper class.
class EndpointerFrameProcessor : public FrameProcessor {};

TEST(EndpointerTest, TestEmbeddedEndpointerEvents) {}

TEST(EndpointerTest, HighSampleRate) {}

}  // namespace speech