| 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 struct TtsUtterance { |
| 18 uint32 utteranceId; |
| 19 string text; |
| 20 double rate; |
| 21 double pitch; |
| 22 }; |
| 23 |
| 24 // Next Method ID: 1 |
| 25 interface TtsHost { |
| 26 // Notifies Chrome of Android tts events. |
| 27 OnTtsEvent@0(uint32 utteranceId, |
| 28 TtsEventType event_type, |
| 29 uint32 charIndex, |
| 30 string error_msg); |
| 31 }; |
| 32 |
| 33 // Next Method ID: 3 |
| 34 interface TtsInstance { |
| 35 // Establishes full-duplex communication with the host. |
| 36 Init@0(TtsHost host_ptr); |
| 37 |
| 38 // Sends an utterance to Android for synthesis. |
| 39 Speak@1(TtsUtterance utterance); |
| 40 |
| 41 // Sends a stop request to Android text to speech. |
| 42 Stop@2(); |
| 43 }; |
| OLD | NEW |