Chromium Code Reviews| Index: components/arc/common/tts.mojom |
| diff --git a/components/arc/common/tts.mojom b/components/arc/common/tts.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..144bc169821ab640ddf2fb79144ccc10e2eb0848 |
| --- /dev/null |
| +++ b/components/arc/common/tts.mojom |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2016 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. |
|
Luis Héctor Chávez
2016/07/26 22:48:11
// Next MinVersion=1
David Tseng
2016/07/27 22:50:59
Done.
|
| + |
| +module arc.mojom; |
| + |
| +enum TtsEventType { |
|
Luis Héctor Chávez
2016/07/26 22:48:11
Can this change in the future? If so, please add a
David Tseng
2016/07/27 22:50:59
Done.
|
| + START = 0, |
| + END, |
| + INTERRUPTED, |
| + ERROR |
| +}; |
| + |
| +// Represents a tts utterance sent from Chrome to Android. |
| +struct TtsUtterance { |
| + uint32 utteranceId; |
| + string text; |
| + double rate; |
| + double pitch; |
| +}; |
| + |
| +interface TtsHost { |
|
Luis Héctor Chávez
2016/07/26 22:48:11
// Next Method ID: 1
David Tseng
2016/07/27 22:50:59
Done.
|
| + // Notifies Chrome of Android tts events. |
| + OnTtsEvent(uint32 utteranceId, TtsEventType event_type); |
|
hidehiko
2016/07/26 17:59:18
Could you add @ index? Ditto for TtsInstance's met
David Tseng
2016/07/27 22:50:59
Done.
|
| +}; |
| + |
| +interface TtsInstance { |
|
Luis Héctor Chávez
2016/07/26 22:48:11
// Next Method ID: 3
David Tseng
2016/07/27 22:50:59
Done.
|
| + // Establishes full-duplex communication with the host. |
| + Init(TtsHost host_ptr); |
| + |
| + // Sends an utterance to Android for synthesis. |
| + Speak(TtsUtterance utterance); |
| + |
| + // Sends a stop request to Android text to speech. |
| + Stop(); |
| +}; |