OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 [ | |
6 { | |
7 "namespace": "ttsEngine", | |
8 "dependencies": [ "tts" ], | |
9 "functions": [ | |
10 { | |
11 "name": "sendTtsEvent", | |
12 "nodoc": true, | |
13 "type": "function", | |
14 "description": "Routes a TTS event from a speech engine to a client.", | |
15 "parameters": [ | |
16 { | |
17 "type": "integer", | |
18 "name": "requestId" | |
19 }, | |
20 { | |
21 "name": "event", | |
22 "$ref": "tts.TtsEvent", | |
23 "description": "The update event from the text-to-speech engine indi
cating the status of this utterance." | |
24 } | |
25 ] | |
26 } | |
27 ], | |
28 "events": [ | |
29 { | |
30 "name": "onSpeak", | |
31 "type": "function", | |
32 "description": "Called when the user makes a call to tts.speak() and one
of the voices from this extension's manifest is the first to match the options
object.", | |
33 "parameters": [ | |
34 { | |
35 "type": "string", | |
36 "name": "utterance", | |
37 "description": "The text to speak, specified as either plain text or
an SSML document. If your engine does not support SSML, you should strip out al
l XML markup and synthesize only the underlying text content. The value of this
parameter is guaranteed to be no more than 32,768 characters. If this engine doe
s not support speaking that many characters at a time, the utterance should be s
plit into smaller chunks and queued internally without returning an error." | |
38 }, | |
39 { | |
40 "type": "object", | |
41 "name": "options", | |
42 "description": "Options specified to the tts.speak() method.", | |
43 "properties": { | |
44 "voiceName": { | |
45 "type": "string", | |
46 "optional": true, | |
47 "description": "The name of the voice to use for synthesis." | |
48 }, | |
49 "lang": { | |
50 "type": "string", | |
51 "optional": true, | |
52 "description": "The language to be used for synthesis, in the fo
rm <em>language</em>-<em>region</em>. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'.
" | |
53 }, | |
54 "gender": { | |
55 "type": "string", | |
56 "optional": true, | |
57 "description": "Gender of voice for synthesized speech.", | |
58 "enum": ["male", "female"] | |
59 }, | |
60 "rate": { | |
61 "type": "number", | |
62 "optional": true, | |
63 "minimum": 0.1, | |
64 "maximum": 10.0, | |
65 "description": "Speaking rate relative to the default rate for t
his voice. 1.0 is the default rate, normally around 180 to 220 words per minute.
2.0 is twice as fast, and 0.5 is half as fast. This value is guaranteed to be b
etween 0.1 and 10.0, inclusive. When a voice does not support this full range of
rates, don't return an error. Instead, clip the rate to the range the voice sup
ports." | |
66 }, | |
67 "pitch": { | |
68 "type": "number", | |
69 "optional": true, | |
70 "minimum": 0, | |
71 "maximum": 2, | |
72 "description": "Speaking pitch between 0 and 2 inclusive, with 0
being lowest and 2 being highest. 1.0 corresponds to this voice's default pitch
." | |
73 }, | |
74 "volume": { | |
75 "type": "number", | |
76 "optional": true, | |
77 "minimum": 0, | |
78 "maximum": 1, | |
79 "description": "Speaking volume between 0 and 1 inclusive, with
0 being lowest and 1 being highest, with a default of 1.0." | |
80 } | |
81 } | |
82 }, | |
83 { | |
84 "name": "sendTtsEvent", | |
85 "type": "function", | |
86 "description": "Call this function with events that occur in the pro
cess of speaking the utterance.", | |
87 "parameters": [ | |
88 { | |
89 "name": "event", | |
90 "$ref": "tts.TtsEvent", | |
91 "description": "The event from the text-to-speech engine indicat
ing the status of this utterance." | |
92 } | |
93 ] | |
94 } | |
95 ] | |
96 }, | |
97 { | |
98 "name": "onStop", | |
99 "type": "function", | |
100 "description": "Fired when a call is made to tts.stop and this extension
may be in the middle of speaking. If an extension receives a call to onStop and
speech is already stopped, it should do nothing (not raise an error)." | |
101 } | |
102 ] | |
103 } | |
104 ] | |
OLD | NEW |