Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: chrome/common/extensions/api/tts.json

Issue 15108002: Add Pause and Resume to Web TTS & Extension TTS APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "tts", 7 "namespace": "tts",
8 "types": [ 8 "types": [
9 { 9 {
10 "id": "TtsEvent", 10 "id": "TtsEvent",
11 "type": "object", 11 "type": "object",
12 "description": "An event from the TTS engine to communicate the status o f an utterance.", 12 "description": "An event from the TTS engine to communicate the status o f an utterance.",
13 "properties": { 13 "properties": {
14 "type": { 14 "type": {
15 "type": "string", 15 "type": "string",
16 "enum": ["start", "end", "word", "sentence", "marker", "interrupted" , "cancelled", "error"], 16 "enum": ["start", "end", "word", "sentence", "marker", "interrupted" , "cancelled", "error", "pause", "resume"],
17 "description": "The type can be 'start' as soon as speech has starte d, 'word' when a word boundary is reached, 'sentence' when a sentence boundary i s reached, 'marker' when an SSML mark element is reached, 'end' when the end of the utterance is reached, 'interrupted' when the utterance is stopped or interru pted before reaching the end, 'cancelled' when it's removed from the queue befor e ever being synthesized, or 'error' when any other error occurs." 17 "description": "The type can be 'start' as soon as speech has starte d, 'word' when a word boundary is reached, 'sentence' when a sentence boundary i s reached, 'marker' when an SSML mark element is reached, 'end' when the end of the utterance is reached, 'interrupted' when the utterance is stopped or interru pted before reaching the end, 'cancelled' when it's removed from the queue befor e ever being synthesized, or 'error' when any other error occurs. When pausing s peech, a 'pause' event is fired if a particular utterance is paused in the middl e, and 'resume' if an utterance resumes speech. Note that pause and resume event s may not fire if speech is paused in-between utterances."
18 }, 18 },
19 "charIndex": { 19 "charIndex": {
20 "type": "number", 20 "type": "number",
21 "optional": true, 21 "optional": true,
22 "description": "The index of the current character in the utterance. " 22 "description": "The index of the current character in the utterance. "
23 }, 23 },
24 "errorMessage": { 24 "errorMessage": {
25 "type": "string", 25 "type": "string",
26 "description": "The error description, if the event type is 'error'. ", 26 "description": "The error description, if the event type is 'error'. ",
27 "optional": true 27 "optional": true
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 "name": "callback", 170 "name": "callback",
171 "optional": true, 171 "optional": true,
172 "description": "Called right away, before speech finishes. Check chr ome.runtime.lastError to make sure there were no errors. Use options.onEvent to get more detailed feedback.", 172 "description": "Called right away, before speech finishes. Check chr ome.runtime.lastError to make sure there were no errors. Use options.onEvent to get more detailed feedback.",
173 "parameters": [] 173 "parameters": []
174 } 174 }
175 ] 175 ]
176 }, 176 },
177 { 177 {
178 "name": "stop", 178 "name": "stop",
179 "type": "function", 179 "type": "function",
180 "description": "Stops any current speech.", 180 "description": "Stops any current speech and flushes the queue of any pe nding utterances. In addition, if speech was paused, it will now be un-paused fo r the next call to speak.",
181 "parameters": [] 181 "parameters": []
182 }, 182 },
183 { 183 {
184 "name": "pause",
185 "type": "function",
186 "description": "Pauses speech synthesis, potentially in the middle of an utterance. A call to resume or stop will un-pause speech.",
David Tseng 2013/05/20 17:44:19 Should speak also unpause speech?
187 "parameters": []
188 },
189 {
190 "name": "resume",
191 "type": "function",
192 "description": "If speech was paused, resumes speaking where it left off .",
193 "parameters": []
not at google - send to devlin 2013/05/20 17:29:53 incidentally maybe all of these "parameters: []" s
194 },
195 {
184 "name": "isSpeaking", 196 "name": "isSpeaking",
185 "type": "function", 197 "type": "function",
186 "description": "Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome.", 198 "description": "Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome.",
187 "parameters": [ 199 "parameters": [
188 { 200 {
189 "type": "function", 201 "type": "function",
190 "name": "callback", 202 "name": "callback",
191 "optional": true, 203 "optional": true,
192 "parameters": [ 204 "parameters": [
193 { 205 {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 "name": "event", 242 "name": "event",
231 "$ref": "TtsEvent", 243 "$ref": "TtsEvent",
232 "description": "The event from the text-to-speech engine indicating the status of this utterance." 244 "description": "The event from the text-to-speech engine indicating the status of this utterance."
233 } 245 }
234 ], 246 ],
235 "description": "Used to pass events back to the function calling speak() ." 247 "description": "Used to pass events back to the function calling speak() ."
236 } 248 }
237 ] 249 ]
238 } 250 }
239 ] 251 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698