| 1 |
/* |
| 2 |
* Copyright 2020 Rémi Bernon for CodeWeavers |
| 3 |
* |
| 4 |
* This library is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU Lesser General Public |
| 6 |
* License as published by the Free Software Foundation; either |
| 7 |
* version 2.1 of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Lesser General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Lesser General Public |
| 15 |
* License along with this library; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifdef __WIDL__ |
| 20 |
#pragma winrt ns_prefix |
| 21 |
#endif |
| 22 |
|
| 23 |
import "inspectable.idl"; |
| 24 |
import "windows.foundation.idl"; |
| 25 |
import "windows.media.idl"; |
| 26 |
import "windows.storage.streams.idl"; |
| 27 |
|
| 28 |
namespace Windows.Media.SpeechSynthesis |
| 29 |
{ |
| 30 |
typedef enum SpeechAppendedSilence SpeechAppendedSilence; |
| 31 |
typedef enum SpeechPunctuationSilence SpeechPunctuationSilence; |
| 32 |
typedef enum VoiceGender VoiceGender; |
| 33 |
interface IInstalledVoicesStatic; |
| 34 |
interface IInstalledVoicesStatic2; |
| 35 |
interface ISpeechSynthesizer; |
| 36 |
interface ISpeechSynthesizer2; |
| 37 |
interface ISpeechSynthesizerOptions; |
| 38 |
interface ISpeechSynthesizerOptions2; |
| 39 |
interface ISpeechSynthesizerOptions3; |
| 40 |
interface IVoiceInformation; |
| 41 |
interface ISpeechSynthesisStream; |
| 42 |
runtimeclass SpeechSynthesizer; |
| 43 |
runtimeclass VoiceInformation; |
| 44 |
runtimeclass SpeechSynthesizerOptions; |
| 45 |
runtimeclass SpeechSynthesisStream; |
| 46 |
|
| 47 |
declare |
| 48 |
{ |
| 49 |
interface Windows.Foundation.Collections.IIterable<Windows.Media.SpeechSynthesis.VoiceInformation*>; |
| 50 |
interface Windows.Foundation.Collections.IIterator<Windows.Media.SpeechSynthesis.VoiceInformation*>; |
| 51 |
interface Windows.Foundation.Collections.IVectorView<Windows.Media.SpeechSynthesis.VoiceInformation*>; |
| 52 |
interface Windows.Foundation.IAsyncOperation<Windows.Media.SpeechSynthesis.SpeechSynthesisStream*>; |
| 53 |
interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Media.SpeechSynthesis.SpeechSynthesisStream*>; |
| 54 |
} |
| 55 |
|
| 56 |
[ |
| 57 |
contract(Windows.Foundation.UniversalApiContract, 6.0) |
| 58 |
] |
| 59 |
enum SpeechAppendedSilence |
| 60 |
{ |
| 61 |
Default = 0, |
| 62 |
Min = 1, |
| 63 |
}; |
| 64 |
|
| 65 |
[ |
| 66 |
contract(Windows.Foundation.UniversalApiContract, 6.0) |
| 67 |
] |
| 68 |
enum SpeechPunctuationSilence |
| 69 |
{ |
| 70 |
Default = 0, |
| 71 |
Min = 1, |
| 72 |
}; |
| 73 |
|
| 74 |
[ |
| 75 |
contract(Windows.Foundation.UniversalApiContract, 1.0) |
| 76 |
] |
| 77 |
enum VoiceGender |
| 78 |
{ |
| 79 |
Male = 0, |
| 80 |
Female = 1 |
| 81 |
}; |
| 82 |
|
| 83 |
[ |
| 84 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 85 |
exclusiveto(Windows.Media.SpeechSynthesis.SpeechSynthesisStream), |
| 86 |
uuid(83e46e93-244c-4622-ba0b-6229c4d0d65d) |
| 87 |
] |
| 88 |
interface ISpeechSynthesisStream : IInspectable |
| 89 |
requires |
| 90 |
Windows.Storage.Streams.IRandomAccessStreamWithContentType, |
| 91 |
Windows.Storage.Streams.IRandomAccessStream, |
| 92 |
Windows.Foundation.IClosable, |
| 93 |
Windows.Storage.Streams.IInputStream, |
| 94 |
Windows.Storage.Streams.IOutputStream, |
| 95 |
Windows.Storage.Streams.IContentTypeProvider |
| 96 |
{ |
| 97 |
[propget] HRESULT Markers([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Media.IMediaMarker*> **value); |
| 98 |
} |
| 99 |
|
| 100 |
[ |
| 101 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 102 |
exclusiveto(Windows.Media.SpeechSynthesis.SpeechSynthesizer), |
| 103 |
uuid(ce9f7c76-97f4-4ced-ad68-d51c458e45c6) |
| 104 |
] |
| 105 |
interface ISpeechSynthesizer : IInspectable |
| 106 |
{ |
| 107 |
HRESULT SynthesizeTextToStreamAsync([in] HSTRING text, [out, retval] Windows.Foundation.IAsyncOperation<Windows.Media.SpeechSynthesis.SpeechSynthesisStream*> **operation); |
| 108 |
HRESULT SynthesizeSsmlToStreamAsync([in] HSTRING Ssml, [out, retval] Windows.Foundation.IAsyncOperation<Windows.Media.SpeechSynthesis.SpeechSynthesisStream*> **operation); |
| 109 |
[propput] HRESULT Voice([in] VoiceInformation *value); |
| 110 |
[propget] HRESULT Voice([out, retval] VoiceInformation **value); |
| 111 |
} |
| 112 |
|
| 113 |
[ |
| 114 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 115 |
exclusiveto(Windows.Media.SpeechSynthesis.SpeechSynthesizer), |
| 116 |
uuid(a7c5ecb2-4339-4d6a-bbf8-c7a4f1544c2e) |
| 117 |
] |
| 118 |
interface ISpeechSynthesizer2 : IInspectable |
| 119 |
{ |
| 120 |
[propget] HRESULT Options([out, retval] SpeechSynthesizerOptions **value); |
| 121 |
} |
| 122 |
|
| 123 |
[ |
| 124 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 125 |
exclusiveto(Windows.Media.SpeechSynthesis.VoiceInformation), |
| 126 |
uuid(b127d6a4-1291-4604-aa9c-83134083352c) |
| 127 |
] |
| 128 |
interface IVoiceInformation : IInspectable |
| 129 |
{ |
| 130 |
[propget] HRESULT DisplayName([out, retval] HSTRING *value); |
| 131 |
[propget] HRESULT Id([out, retval] HSTRING *value); |
| 132 |
[propget] HRESULT Language([out, retval] HSTRING *value); |
| 133 |
[propget] HRESULT Description([out, retval] HSTRING *value); |
| 134 |
[propget] HRESULT Gender([out, retval] VoiceGender *value); |
| 135 |
} |
| 136 |
|
| 137 |
[ |
| 138 |
contract(Windows.Foundation.UniversalApiContract, 4.0), |
| 139 |
exclusiveto(Windows.Media.SpeechSynthesis.SpeechSynthesizerOptions), |
| 140 |
uuid(a0e23871-cc3d-43c9-91b1-ee185324d83d) |
| 141 |
] |
| 142 |
interface ISpeechSynthesizerOptions : IInspectable |
| 143 |
{ |
| 144 |
[propget] HRESULT IncludeWordBoundaryMetadata([out, retval] boolean *value); |
| 145 |
[propput] HRESULT IncludeWordBoundaryMetadata([in] boolean value); |
| 146 |
[propget] HRESULT IncludeSentenceBoundaryMetadata([out, retval] boolean *value); |
| 147 |
[propput] HRESULT IncludeSentenceBoundaryMetadata([in] boolean value); |
| 148 |
} |
| 149 |
|
| 150 |
[ |
| 151 |
contract(Windows.Foundation.UniversalApiContract, 5.0), |
| 152 |
exclusiveto(Windows.Media.SpeechSynthesis.SpeechSynthesizerOptions), |
| 153 |
uuid(1cbef60e-119c-4bed-b118-d250c3a25793), |
| 154 |
] |
| 155 |
interface ISpeechSynthesizerOptions2 : IInspectable |
| 156 |
{ |
| 157 |
[propget] HRESULT AudioVolume([out, retval] DOUBLE *value); |
| 158 |
[propput] HRESULT AudioVolume([in] DOUBLE value); |
| 159 |
[propget] HRESULT SpeakingRate([out, retval] DOUBLE *value); |
| 160 |
[propput] HRESULT SpeakingRate([in] DOUBLE value); |
| 161 |
[propget] HRESULT AudioPitch([out, retval] DOUBLE *value); |
| 162 |
[propput] HRESULT AudioPitch([in] DOUBLE value); |
| 163 |
} |
| 164 |
|
| 165 |
[ |
| 166 |
contract(Windows.Foundation.UniversalApiContract, 6.0), |
| 167 |
exclusiveto(Windows.Media.SpeechSynthesis.SpeechSynthesizerOptions), |
| 168 |
uuid(401ed877-902c-4814-a582-a5d0c0769fa8) |
| 169 |
] |
| 170 |
interface ISpeechSynthesizerOptions3 : IInspectable |
| 171 |
{ |
| 172 |
[propget] HRESULT AppendedSilence([out, retval] Windows.Media.SpeechSynthesis.SpeechAppendedSilence *value); |
| 173 |
[propput] HRESULT AppendedSilence([in] Windows.Media.SpeechSynthesis.SpeechAppendedSilence value); |
| 174 |
[propget] HRESULT PunctuationSilence([out, retval] Windows.Media.SpeechSynthesis.SpeechPunctuationSilence *value); |
| 175 |
[propput] HRESULT PunctuationSilence([in] Windows.Media.SpeechSynthesis.SpeechPunctuationSilence value); |
| 176 |
} |
| 177 |
|
| 178 |
[ |
| 179 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 180 |
exclusiveto(Windows.Media.SpeechSynthesis.SpeechSynthesizer), |
| 181 |
uuid(7d526ecc-7533-4c3f-85be-888c2baeebdc) |
| 182 |
] |
| 183 |
interface IInstalledVoicesStatic : IInspectable |
| 184 |
{ |
| 185 |
[propget] HRESULT AllVoices([out, retval] Windows.Foundation.Collections.IVectorView<VoiceInformation*> **value); |
| 186 |
[propget] HRESULT DefaultVoice([out, retval] VoiceInformation **value); |
| 187 |
} |
| 188 |
|
| 189 |
[ |
| 190 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 191 |
marshaling_behavior(agile) |
| 192 |
] |
| 193 |
runtimeclass VoiceInformation |
| 194 |
{ |
| 195 |
[default] interface Windows.Media.SpeechSynthesis.IVoiceInformation; |
| 196 |
} |
| 197 |
|
| 198 |
[ |
| 199 |
contract(Windows.Foundation.UniversalApiContract, 4.0), |
| 200 |
marshaling_behavior(agile) |
| 201 |
] |
| 202 |
runtimeclass SpeechSynthesizerOptions |
| 203 |
{ |
| 204 |
[default] interface Windows.Media.SpeechSynthesis.ISpeechSynthesizerOptions; |
| 205 |
[contract(Windows.Foundation.UniversalApiContract, 5.0)] interface Windows.Media.SpeechSynthesis.ISpeechSynthesizerOptions2; |
| 206 |
[contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.Media.SpeechSynthesis.ISpeechSynthesizerOptions3; |
| 207 |
} |
| 208 |
|
| 209 |
[ |
| 210 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 211 |
marshaling_behavior(agile) |
| 212 |
] |
| 213 |
runtimeclass SpeechSynthesisStream |
| 214 |
{ |
| 215 |
[default] interface Windows.Media.SpeechSynthesis.ISpeechSynthesisStream; |
| 216 |
interface Windows.Storage.Streams.IRandomAccessStreamWithContentType; |
| 217 |
interface Windows.Storage.Streams.IContentTypeProvider; |
| 218 |
interface Windows.Storage.Streams.IRandomAccessStream; |
| 219 |
interface Windows.Storage.Streams.IOutputStream; |
| 220 |
interface Windows.Foundation.IClosable; |
| 221 |
interface Windows.Storage.Streams.IInputStream; |
| 222 |
} |
| 223 |
|
| 224 |
[ |
| 225 |
activatable(Windows.Foundation.UniversalApiContract, 1.0), |
| 226 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 227 |
marshaling_behavior(agile), |
| 228 |
static(Windows.Media.SpeechSynthesis.IInstalledVoicesStatic, Windows.Foundation.UniversalApiContract, 1.0), |
| 229 |
/* static(Windows.Media.SpeechSynthesis.IInstalledVoicesStatic2, Windows.Foundation.UniversalApiContract, 5.0) */ |
| 230 |
] |
| 231 |
runtimeclass SpeechSynthesizer |
| 232 |
{ |
| 233 |
[default] interface Windows.Media.SpeechSynthesis.ISpeechSynthesizer; |
| 234 |
interface Windows.Foundation.IClosable; |
| 235 |
[contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.Media.SpeechSynthesis.ISpeechSynthesizer2; |
| 236 |
} |
| 237 |
} |