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

Unified 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, remove unused parameters from json 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/tts.json
diff --git a/chrome/common/extensions/api/tts.json b/chrome/common/extensions/api/tts.json
index 3b2abf240c35e045a07b612fc2a72908f1afc1e3..2abaaa464be65241e679437eb3ccd094e06c1367 100644
--- a/chrome/common/extensions/api/tts.json
+++ b/chrome/common/extensions/api/tts.json
@@ -13,8 +13,8 @@
"properties": {
"type": {
"type": "string",
- "enum": ["start", "end", "word", "sentence", "marker", "interrupted", "cancelled", "error"],
- "description": "The type can be 'start' as soon as speech has started, 'word' when a word boundary is reached, 'sentence' when a sentence boundary is 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 interrupted before reaching the end, 'cancelled' when it's removed from the queue before ever being synthesized, or 'error' when any other error occurs."
+ "enum": ["start", "end", "word", "sentence", "marker", "interrupted", "cancelled", "error", "pause", "resume"],
+ "description": "The type can be 'start' as soon as speech has started, 'word' when a word boundary is reached, 'sentence' when a sentence boundary is 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 interrupted before reaching the end, 'cancelled' when it's removed from the queue before ever being synthesized, or 'error' when any other error occurs. When pausing speech, a 'pause' event is fired if a particular utterance is paused in the middle, and 'resume' if an utterance resumes speech. Note that pause and resume events may not fire if speech is paused in-between utterances."
},
"charIndex": {
"type": "number",
@@ -169,16 +169,24 @@
"type": "function",
"name": "callback",
"optional": true,
- "description": "Called right away, before speech finishes. Check chrome.runtime.lastError to make sure there were no errors. Use options.onEvent to get more detailed feedback.",
- "parameters": []
+ "description": "Called right away, before speech finishes. Check chrome.runtime.lastError to make sure there were no errors. Use options.onEvent to get more detailed feedback."
}
]
},
{
"name": "stop",
"type": "function",
- "description": "Stops any current speech.",
- "parameters": []
+ "description": "Stops any current speech and flushes the queue of any pending utterances. In addition, if speech was paused, it will now be un-paused for the next call to speak."
+ },
+ {
+ "name": "pause",
+ "type": "function",
+ "description": "Pauses speech synthesis, potentially in the middle of an utterance. A call to resume or stop will un-pause speech."
+ },
+ {
+ "name": "resume",
+ "type": "function",
+ "description": "If speech was paused, resumes speaking where it left off."
},
{
"name": "isSpeaking",

Powered by Google App Engine
This is Rietveld 408576698