From de7560c8256cdbc7a746b2d411de48c1d290d78b Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Tue, 11 Apr 2023 02:09:03 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 523339435 --- .../tasks/cc/audio/audio_classifier/audio_classifier.cc | 2 +- .../cc/audio/audio_classifier/audio_classifier_test.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mediapipe/tasks/cc/audio/audio_classifier/audio_classifier.cc b/mediapipe/tasks/cc/audio/audio_classifier/audio_classifier.cc index 91c853120..822c3a22f 100644 --- a/mediapipe/tasks/cc/audio/audio_classifier/audio_classifier.cc +++ b/mediapipe/tasks/cc/audio/audio_classifier/audio_classifier.cc @@ -149,7 +149,7 @@ absl::StatusOr> AudioClassifier::Classify( absl::Status AudioClassifier::ClassifyAsync(Matrix audio_block, double audio_sample_rate, - int64 timestamp_ms) { + int64_t timestamp_ms) { MP_RETURN_IF_ERROR(CheckOrSetSampleRate(kSampleRateName, audio_sample_rate)); return SendAudioStreamData( {{kAudioStreamName, diff --git a/mediapipe/tasks/cc/audio/audio_classifier/audio_classifier_test.cc b/mediapipe/tasks/cc/audio/audio_classifier/audio_classifier_test.cc index 2d5b221a9..108374003 100644 --- a/mediapipe/tasks/cc/audio/audio_classifier/audio_classifier_test.cc +++ b/mediapipe/tasks/cc/audio/audio_classifier/audio_classifier_test.cc @@ -77,7 +77,7 @@ void CheckSpeechResult(const std::vector& result, EXPECT_EQ(result.size(), 5); // Ignore last result, which operates on a too small chunk to return relevant // results. - std::vector timestamps_ms = {0, 975, 1950, 2925}; + std::vector timestamps_ms = {0, 975, 1950, 2925}; for (int i = 0; i < timestamps_ms.size(); i++) { EXPECT_EQ(result[i].timestamp_ms, timestamps_ms[i]); EXPECT_EQ(result[i].classifications.size(), 1); @@ -143,7 +143,7 @@ void CheckStreamingModeResults(std::vector outputs) { EXPECT_EQ(outputs.size(), 5); // Ignore last result, which operates on a too small chunk to return relevant // results. - std::vector timestamps_ms = {0, 975, 1950, 2925}; + std::vector timestamps_ms = {0, 975, 1950, 2925}; for (int i = 0; i < outputs.size() - 1; i++) { EXPECT_EQ(outputs[i].timestamp_ms.value(), timestamps_ms[i]); EXPECT_EQ(outputs[i].classifications.size(), 1); @@ -456,7 +456,7 @@ TEST_F(ClassifyTest, SucceedsWithCategoryDenylist) { /*audio_sample_rate=*/48000)); MP_ASSERT_OK(audio_classifier->Close()); // All categories with the "Speech" label are filtered out. - std::vector timestamps_ms = {0, 975, 1950, 2925}; + std::vector timestamps_ms = {0, 975, 1950, 2925}; for (int i = 0; i < timestamps_ms.size(); i++) { EXPECT_EQ(result[i].timestamp_ms, timestamps_ms[i]); EXPECT_EQ(result[i].classifications.size(), 1);