-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
155 lines (154 loc) · 6.09 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
export declare class Speechlet {
_markup: any[];
constructor(text?: string);
_exposeSayAsConvenienceMethods(): void;
_escape(text: string): string;
readAsNumberedList(list: any, options?: readAsNumberedListOptions): this;
readAsOrdinalList(list: any, options?: readAsOrdinalListOptions): this;
readAsList(list: any, options?: readAsListOptions): this;
/**
* The audio tag lets you provide the URL for an MP3 file that the Alexa service can play
* while rendering a response. You can use this to embed short, pre-recorded audio within your service’s response.
* https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#audio
*/
audio(src?: string): this;
/**
* Emphasize the tagged words or phrases. Emphasis changes rate and volume of the speech.
* More emphasis is spoken louder and slower. Less emphasis is quieter and faster.
* https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#emphasis
*/
emphasis(text: string, options: emphasisOptions): this;
/**
* Adds raw text without any changes.
*/
raw(text: string): this;
/**
* Adds raw text without any changes.
*/
say(text: string): this;
/**
* Wraps text in <s> tags. This is equivalent to ending a sentence with a period (.)
* or specifying a pause with <break strength="strong"/>.
* https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#s
*/
sentence(text: string): this;
/**
* Represents a paragraph. This tag provides extra-strong breaks before and after the tag.
* This is equivalent to specifying a pause with <break strength="x-strong"/>.
* https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#p
*/
paragraph(text: string): this;
/**
* Provides a phonemic/phonetic pronunciation for the contained text.
* For example, people may pronounce words like “pecan” differently.
* https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#phoneme
*/
phoneme(text: string, options?: phonemeOptions): this;
/**
* Pronounce the specified word or phrase as a different word or phrase.
* Specify the pronunciation to substitute with the alias attribute.
* https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#sub
*/
sub(text: string, options?: subOptions): this;
/**
* Describes how the text should be interpreted.
* This lets you provide additional context to the text and eliminate any ambiguity
* on how Alexa should render the text. Indicate how Alexa should interpret the text
* with the interpret-as attribute. https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#say-as
*/
sayAs(text: string, options?: sayAsOptions): this;
/**
* special convenience method for sayAs because date also accepts a `format` argument
*/
sayAsDate(text: any, format: any): this;
/**
* special convenience method for sayAs because date also accepts a `format` argument
*/
sayAsVerb(text: string): this;
/**
* special convenience method for sayAs because date also accepts a `format` argument
*/
sayAsNoun(text: string): this;
/**
* special convenience method for sayAs because date also accepts a `format` argument
*/
sayAsPastParticiple(text: string): this;
/**
* Similar to <say-as>, this tag customizes the pronunciation of words by specifying the word’s part of speech.
* https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#w
*/
w(text: string, options?: wOptions): this;
/**
* https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#prosody
*/
prosody(text: string, options?: prosodyOptions): this;
/**
* https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#amazon-effect
*
*/
amazonEffect(text: string, options?: amazonEffectOptions): this;
/**
* Convenience method for doing amazon:effect name="whisper"
*/
whisper(text: string): this;
/**
* https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#break
* defaults to <break strength="strong">
*/
break(options?: breakOptions): this;
/**
* convenience method for calling "break". This one only accepts a time param. If you need to use a break, with the "strength" attr, then use break();
*/
pause(time?: string): this;
/**
* outputs the speech markup as a string. This does not include the root <speak></speak> node in the output`
* if you are working with the official `alexa-sdk` then the `emit()` fn will wrap the ssml with the <speak> node for you
* if you need the <speak> nodes then use the `outputWithRootNode()` fn
*/
output(): string;
/**
* outputs the markup as a string just like the `output()` fn, except this includes wraps with the root <speak></speak> nodes
*/
outputWithRootNode(): string;
}
export interface readAsNumberedListOptions {
pause?: string;
}
export interface readAsOrdinalListOptions {
pause?: string;
}
export interface readAsListOptions {
lastSeparator?: string;
pauseBeforeSeparator?: string;
pauseAfterSeparator?: string;
separator?: string;
}
export interface emphasisOptions {
level?: string;
}
export interface phonemeOptions {
alphabet?: string;
ph?: string;
}
export interface subOptions {
alias?: string;
}
export interface sayAsOptions {
interpretAs?: string;
format?: string;
}
export interface wOptions {
role?: string;
}
export interface prosodyOptions {
rate?: string;
pitch?: string;
volume?: string;
}
export interface amazonEffectOptions {
name?: string;
}
export interface breakOptions {
time?: string;
strength?: string;
}