blob: 05ca09fe939468d76d93da43f7796b42ace0af6d (
plain)
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
|
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module chrome.mojom;
// Browser process interface exposed to the renderer for communication about
// the Live Caption feature.
interface CaptionHost {
// Called when the speech recognition client receives a transcription from the
// speech service. Returns whether the transcription result was received
// successfully. Transcriptions will halt if this returns false.
OnTranscription(TranscriptionResult transcription_result) => (bool success);
};
// A transcription result created by the speech recognition client in the
// renderer and passed to the browser.
struct TranscriptionResult {
string transcription;
// A flag indicating whether the result is final. If true, the result is
// locked in and the next result returned will not overlap with the previous
// final result.
bool is_final;
};
|