1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 | *
|
---|
11 | * Unless required by applicable law or agreed to in writing, software
|
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service\Speech;
|
---|
19 |
|
---|
20 | class RecognitionConfig extends \Google\Collection
|
---|
21 | {
|
---|
22 | protected $collection_key = 'speechContexts';
|
---|
23 | protected $adaptationType = SpeechAdaptation::class;
|
---|
24 | protected $adaptationDataType = '';
|
---|
25 | /**
|
---|
26 | * @var string[]
|
---|
27 | */
|
---|
28 | public $alternativeLanguageCodes;
|
---|
29 | /**
|
---|
30 | * @var int
|
---|
31 | */
|
---|
32 | public $audioChannelCount;
|
---|
33 | protected $diarizationConfigType = SpeakerDiarizationConfig::class;
|
---|
34 | protected $diarizationConfigDataType = '';
|
---|
35 | /**
|
---|
36 | * @var bool
|
---|
37 | */
|
---|
38 | public $enableAutomaticPunctuation;
|
---|
39 | /**
|
---|
40 | * @var bool
|
---|
41 | */
|
---|
42 | public $enableSeparateRecognitionPerChannel;
|
---|
43 | /**
|
---|
44 | * @var bool
|
---|
45 | */
|
---|
46 | public $enableSpokenEmojis;
|
---|
47 | /**
|
---|
48 | * @var bool
|
---|
49 | */
|
---|
50 | public $enableSpokenPunctuation;
|
---|
51 | /**
|
---|
52 | * @var bool
|
---|
53 | */
|
---|
54 | public $enableWordConfidence;
|
---|
55 | /**
|
---|
56 | * @var bool
|
---|
57 | */
|
---|
58 | public $enableWordTimeOffsets;
|
---|
59 | /**
|
---|
60 | * @var string
|
---|
61 | */
|
---|
62 | public $encoding;
|
---|
63 | /**
|
---|
64 | * @var string
|
---|
65 | */
|
---|
66 | public $languageCode;
|
---|
67 | /**
|
---|
68 | * @var int
|
---|
69 | */
|
---|
70 | public $maxAlternatives;
|
---|
71 | protected $metadataType = RecognitionMetadata::class;
|
---|
72 | protected $metadataDataType = '';
|
---|
73 | /**
|
---|
74 | * @var string
|
---|
75 | */
|
---|
76 | public $model;
|
---|
77 | /**
|
---|
78 | * @var bool
|
---|
79 | */
|
---|
80 | public $profanityFilter;
|
---|
81 | /**
|
---|
82 | * @var int
|
---|
83 | */
|
---|
84 | public $sampleRateHertz;
|
---|
85 | protected $speechContextsType = SpeechContext::class;
|
---|
86 | protected $speechContextsDataType = 'array';
|
---|
87 | protected $transcriptNormalizationType = TranscriptNormalization::class;
|
---|
88 | protected $transcriptNormalizationDataType = '';
|
---|
89 | /**
|
---|
90 | * @var bool
|
---|
91 | */
|
---|
92 | public $useEnhanced;
|
---|
93 |
|
---|
94 | /**
|
---|
95 | * @param SpeechAdaptation
|
---|
96 | */
|
---|
97 | public function setAdaptation(SpeechAdaptation $adaptation)
|
---|
98 | {
|
---|
99 | $this->adaptation = $adaptation;
|
---|
100 | }
|
---|
101 | /**
|
---|
102 | * @return SpeechAdaptation
|
---|
103 | */
|
---|
104 | public function getAdaptation()
|
---|
105 | {
|
---|
106 | return $this->adaptation;
|
---|
107 | }
|
---|
108 | /**
|
---|
109 | * @param string[]
|
---|
110 | */
|
---|
111 | public function setAlternativeLanguageCodes($alternativeLanguageCodes)
|
---|
112 | {
|
---|
113 | $this->alternativeLanguageCodes = $alternativeLanguageCodes;
|
---|
114 | }
|
---|
115 | /**
|
---|
116 | * @return string[]
|
---|
117 | */
|
---|
118 | public function getAlternativeLanguageCodes()
|
---|
119 | {
|
---|
120 | return $this->alternativeLanguageCodes;
|
---|
121 | }
|
---|
122 | /**
|
---|
123 | * @param int
|
---|
124 | */
|
---|
125 | public function setAudioChannelCount($audioChannelCount)
|
---|
126 | {
|
---|
127 | $this->audioChannelCount = $audioChannelCount;
|
---|
128 | }
|
---|
129 | /**
|
---|
130 | * @return int
|
---|
131 | */
|
---|
132 | public function getAudioChannelCount()
|
---|
133 | {
|
---|
134 | return $this->audioChannelCount;
|
---|
135 | }
|
---|
136 | /**
|
---|
137 | * @param SpeakerDiarizationConfig
|
---|
138 | */
|
---|
139 | public function setDiarizationConfig(SpeakerDiarizationConfig $diarizationConfig)
|
---|
140 | {
|
---|
141 | $this->diarizationConfig = $diarizationConfig;
|
---|
142 | }
|
---|
143 | /**
|
---|
144 | * @return SpeakerDiarizationConfig
|
---|
145 | */
|
---|
146 | public function getDiarizationConfig()
|
---|
147 | {
|
---|
148 | return $this->diarizationConfig;
|
---|
149 | }
|
---|
150 | /**
|
---|
151 | * @param bool
|
---|
152 | */
|
---|
153 | public function setEnableAutomaticPunctuation($enableAutomaticPunctuation)
|
---|
154 | {
|
---|
155 | $this->enableAutomaticPunctuation = $enableAutomaticPunctuation;
|
---|
156 | }
|
---|
157 | /**
|
---|
158 | * @return bool
|
---|
159 | */
|
---|
160 | public function getEnableAutomaticPunctuation()
|
---|
161 | {
|
---|
162 | return $this->enableAutomaticPunctuation;
|
---|
163 | }
|
---|
164 | /**
|
---|
165 | * @param bool
|
---|
166 | */
|
---|
167 | public function setEnableSeparateRecognitionPerChannel($enableSeparateRecognitionPerChannel)
|
---|
168 | {
|
---|
169 | $this->enableSeparateRecognitionPerChannel = $enableSeparateRecognitionPerChannel;
|
---|
170 | }
|
---|
171 | /**
|
---|
172 | * @return bool
|
---|
173 | */
|
---|
174 | public function getEnableSeparateRecognitionPerChannel()
|
---|
175 | {
|
---|
176 | return $this->enableSeparateRecognitionPerChannel;
|
---|
177 | }
|
---|
178 | /**
|
---|
179 | * @param bool
|
---|
180 | */
|
---|
181 | public function setEnableSpokenEmojis($enableSpokenEmojis)
|
---|
182 | {
|
---|
183 | $this->enableSpokenEmojis = $enableSpokenEmojis;
|
---|
184 | }
|
---|
185 | /**
|
---|
186 | * @return bool
|
---|
187 | */
|
---|
188 | public function getEnableSpokenEmojis()
|
---|
189 | {
|
---|
190 | return $this->enableSpokenEmojis;
|
---|
191 | }
|
---|
192 | /**
|
---|
193 | * @param bool
|
---|
194 | */
|
---|
195 | public function setEnableSpokenPunctuation($enableSpokenPunctuation)
|
---|
196 | {
|
---|
197 | $this->enableSpokenPunctuation = $enableSpokenPunctuation;
|
---|
198 | }
|
---|
199 | /**
|
---|
200 | * @return bool
|
---|
201 | */
|
---|
202 | public function getEnableSpokenPunctuation()
|
---|
203 | {
|
---|
204 | return $this->enableSpokenPunctuation;
|
---|
205 | }
|
---|
206 | /**
|
---|
207 | * @param bool
|
---|
208 | */
|
---|
209 | public function setEnableWordConfidence($enableWordConfidence)
|
---|
210 | {
|
---|
211 | $this->enableWordConfidence = $enableWordConfidence;
|
---|
212 | }
|
---|
213 | /**
|
---|
214 | * @return bool
|
---|
215 | */
|
---|
216 | public function getEnableWordConfidence()
|
---|
217 | {
|
---|
218 | return $this->enableWordConfidence;
|
---|
219 | }
|
---|
220 | /**
|
---|
221 | * @param bool
|
---|
222 | */
|
---|
223 | public function setEnableWordTimeOffsets($enableWordTimeOffsets)
|
---|
224 | {
|
---|
225 | $this->enableWordTimeOffsets = $enableWordTimeOffsets;
|
---|
226 | }
|
---|
227 | /**
|
---|
228 | * @return bool
|
---|
229 | */
|
---|
230 | public function getEnableWordTimeOffsets()
|
---|
231 | {
|
---|
232 | return $this->enableWordTimeOffsets;
|
---|
233 | }
|
---|
234 | /**
|
---|
235 | * @param string
|
---|
236 | */
|
---|
237 | public function setEncoding($encoding)
|
---|
238 | {
|
---|
239 | $this->encoding = $encoding;
|
---|
240 | }
|
---|
241 | /**
|
---|
242 | * @return string
|
---|
243 | */
|
---|
244 | public function getEncoding()
|
---|
245 | {
|
---|
246 | return $this->encoding;
|
---|
247 | }
|
---|
248 | /**
|
---|
249 | * @param string
|
---|
250 | */
|
---|
251 | public function setLanguageCode($languageCode)
|
---|
252 | {
|
---|
253 | $this->languageCode = $languageCode;
|
---|
254 | }
|
---|
255 | /**
|
---|
256 | * @return string
|
---|
257 | */
|
---|
258 | public function getLanguageCode()
|
---|
259 | {
|
---|
260 | return $this->languageCode;
|
---|
261 | }
|
---|
262 | /**
|
---|
263 | * @param int
|
---|
264 | */
|
---|
265 | public function setMaxAlternatives($maxAlternatives)
|
---|
266 | {
|
---|
267 | $this->maxAlternatives = $maxAlternatives;
|
---|
268 | }
|
---|
269 | /**
|
---|
270 | * @return int
|
---|
271 | */
|
---|
272 | public function getMaxAlternatives()
|
---|
273 | {
|
---|
274 | return $this->maxAlternatives;
|
---|
275 | }
|
---|
276 | /**
|
---|
277 | * @param RecognitionMetadata
|
---|
278 | */
|
---|
279 | public function setMetadata(RecognitionMetadata $metadata)
|
---|
280 | {
|
---|
281 | $this->metadata = $metadata;
|
---|
282 | }
|
---|
283 | /**
|
---|
284 | * @return RecognitionMetadata
|
---|
285 | */
|
---|
286 | public function getMetadata()
|
---|
287 | {
|
---|
288 | return $this->metadata;
|
---|
289 | }
|
---|
290 | /**
|
---|
291 | * @param string
|
---|
292 | */
|
---|
293 | public function setModel($model)
|
---|
294 | {
|
---|
295 | $this->model = $model;
|
---|
296 | }
|
---|
297 | /**
|
---|
298 | * @return string
|
---|
299 | */
|
---|
300 | public function getModel()
|
---|
301 | {
|
---|
302 | return $this->model;
|
---|
303 | }
|
---|
304 | /**
|
---|
305 | * @param bool
|
---|
306 | */
|
---|
307 | public function setProfanityFilter($profanityFilter)
|
---|
308 | {
|
---|
309 | $this->profanityFilter = $profanityFilter;
|
---|
310 | }
|
---|
311 | /**
|
---|
312 | * @return bool
|
---|
313 | */
|
---|
314 | public function getProfanityFilter()
|
---|
315 | {
|
---|
316 | return $this->profanityFilter;
|
---|
317 | }
|
---|
318 | /**
|
---|
319 | * @param int
|
---|
320 | */
|
---|
321 | public function setSampleRateHertz($sampleRateHertz)
|
---|
322 | {
|
---|
323 | $this->sampleRateHertz = $sampleRateHertz;
|
---|
324 | }
|
---|
325 | /**
|
---|
326 | * @return int
|
---|
327 | */
|
---|
328 | public function getSampleRateHertz()
|
---|
329 | {
|
---|
330 | return $this->sampleRateHertz;
|
---|
331 | }
|
---|
332 | /**
|
---|
333 | * @param SpeechContext[]
|
---|
334 | */
|
---|
335 | public function setSpeechContexts($speechContexts)
|
---|
336 | {
|
---|
337 | $this->speechContexts = $speechContexts;
|
---|
338 | }
|
---|
339 | /**
|
---|
340 | * @return SpeechContext[]
|
---|
341 | */
|
---|
342 | public function getSpeechContexts()
|
---|
343 | {
|
---|
344 | return $this->speechContexts;
|
---|
345 | }
|
---|
346 | /**
|
---|
347 | * @param TranscriptNormalization
|
---|
348 | */
|
---|
349 | public function setTranscriptNormalization(TranscriptNormalization $transcriptNormalization)
|
---|
350 | {
|
---|
351 | $this->transcriptNormalization = $transcriptNormalization;
|
---|
352 | }
|
---|
353 | /**
|
---|
354 | * @return TranscriptNormalization
|
---|
355 | */
|
---|
356 | public function getTranscriptNormalization()
|
---|
357 | {
|
---|
358 | return $this->transcriptNormalization;
|
---|
359 | }
|
---|
360 | /**
|
---|
361 | * @param bool
|
---|
362 | */
|
---|
363 | public function setUseEnhanced($useEnhanced)
|
---|
364 | {
|
---|
365 | $this->useEnhanced = $useEnhanced;
|
---|
366 | }
|
---|
367 | /**
|
---|
368 | * @return bool
|
---|
369 | */
|
---|
370 | public function getUseEnhanced()
|
---|
371 | {
|
---|
372 | return $this->useEnhanced;
|
---|
373 | }
|
---|
374 | }
|
---|
375 |
|
---|
376 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
377 | class_alias(RecognitionConfig::class, 'Google_Service_Speech_RecognitionConfig');
|
---|