Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 // Next MinVersion: 1 | |
| 5 | |
| 6 module arc.mojom; | |
| 7 | |
| 8 [Extensible] | |
| 9 enum TtsEventType { | |
| 10 START = 0, | |
| 11 END, | |
| 12 INTERRUPTED, | |
| 13 ERROR | |
| 14 }; | |
| 15 | |
| 16 // Represents a tts utterance sent from Chrome to Android. | |
| 17 [Extensible] | |
|
Luis Héctor Chávez
2016/08/01 20:29:53
structs are always extensible, so this attribute i
David Tseng
2016/08/02 16:32:18
Done.
| |
| 18 struct TtsUtterance { | |
| 19 uint32 utteranceId; | |
| 20 string text; | |
| 21 double rate; | |
| 22 double pitch; | |
| 23 }; | |
| 24 | |
| 25 // Next Method ID: 1 | |
| 26 interface TtsHost { | |
| 27 // Notifies Chrome of Android tts events. | |
| 28 OnTtsEvent@0(uint32 utteranceId, | |
| 29 TtsEventType event_type, | |
| 30 uint32 charIndex, | |
| 31 string error_msg); | |
| 32 }; | |
| 33 | |
| 34 // Next Method ID: 3 | |
| 35 interface TtsInstance { | |
| 36 // Establishes full-duplex communication with the host. | |
| 37 Init@0(TtsHost host_ptr); | |
| 38 | |
| 39 // Sends an utterance to Android for synthesis. | |
| 40 Speak@1(TtsUtterance utterance); | |
| 41 | |
| 42 // Sends a stop request to Android text to speech. | |
| 43 Stop@2(); | |
| 44 }; | |
| OLD | NEW |