-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsoda_proto_mojom_conversion.h
40 lines (30 loc) · 1.45 KB
/
soda_proto_mojom_conversion.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ML_SODA_PROTO_MOJOM_CONVERSION_H_
#define ML_SODA_PROTO_MOJOM_CONVERSION_H_
#include "chrome/knowledge/soda/extended_soda_api.pb.h"
#include "ml/mojom/soda.mojom.h"
namespace ml {
chromeos::machine_learning::mojom::SpeechRecognizerEventPtr
SpeechRecognizerEventFromProto(
const speech::soda::chrome::SodaResponse& soda_response);
bool IsStopSodaResponse(
const speech::soda::chrome::SodaResponse& soda_response);
bool IsStartSodaResponse(
const speech::soda::chrome::SodaResponse& soda_response);
bool IsShutdownSodaResponse(
const speech::soda::chrome::SodaResponse& soda_response);
// Exposed to ease testing.
namespace internal {
chromeos::machine_learning::mojom::AudioLevelEventPtr AudioLevelEventFromProto(
const speech::soda::chrome::SodaResponse& soda_response);
chromeos::machine_learning::mojom::PartialResultPtr PartialResultFromProto(
const speech::soda::chrome::SodaResponse& soda_response);
chromeos::machine_learning::mojom::FinalResultPtr FinalResultFromProto(
const speech::soda::chrome::SodaResponse& soda_response);
chromeos::machine_learning::mojom::EndpointerEventPtr EndpointerEventFromProto(
const speech::soda::chrome::SodaResponse& soda_response);
} // namespace internal
} // namespace ml
#endif // ML_SODA_PROTO_MOJOM_CONVERSION_H_