source: vendor/google/apiclient-services/src/Speech.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago

Upload project files

  • Property mode set to 100644
File size: 8.2 KB
Line 
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
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for Speech (v1).
24 *
25 * <p>
26 * Converts audio to text by applying powerful neural network models.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/speech-to-text/docs/quickstart-protocol" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class Speech extends \Google\Service
36{
37 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
38 const CLOUD_PLATFORM =
39 "https://www.googleapis.com/auth/cloud-platform";
40
41 public $operations;
42 public $projects_locations_customClasses;
43 public $projects_locations_phraseSets;
44 public $speech;
45 public $rootUrlTemplate;
46
47 /**
48 * Constructs the internal representation of the Speech service.
49 *
50 * @param Client|array $clientOrConfig The client used to deliver requests, or a
51 * config array to pass to a new Client instance.
52 * @param string $rootUrl The root URL used for requests to the service.
53 */
54 public function __construct($clientOrConfig = [], $rootUrl = null)
55 {
56 parent::__construct($clientOrConfig);
57 $this->rootUrl = $rootUrl ?: 'https://speech.googleapis.com/';
58 $this->rootUrlTemplate = $rootUrl ?: 'https://speech.UNIVERSE_DOMAIN/';
59 $this->servicePath = '';
60 $this->batchPath = 'batch';
61 $this->version = 'v1';
62 $this->serviceName = 'speech';
63
64 $this->operations = new Speech\Resource\Operations(
65 $this,
66 $this->serviceName,
67 'operations',
68 [
69 'methods' => [
70 'get' => [
71 'path' => 'v1/operations/{+name}',
72 'httpMethod' => 'GET',
73 'parameters' => [
74 'name' => [
75 'location' => 'path',
76 'type' => 'string',
77 'required' => true,
78 ],
79 ],
80 ],'list' => [
81 'path' => 'v1/operations',
82 'httpMethod' => 'GET',
83 'parameters' => [
84 'filter' => [
85 'location' => 'query',
86 'type' => 'string',
87 ],
88 'name' => [
89 'location' => 'query',
90 'type' => 'string',
91 ],
92 'pageSize' => [
93 'location' => 'query',
94 'type' => 'integer',
95 ],
96 'pageToken' => [
97 'location' => 'query',
98 'type' => 'string',
99 ],
100 ],
101 ],
102 ]
103 ]
104 );
105 $this->projects_locations_customClasses = new Speech\Resource\ProjectsLocationsCustomClasses(
106 $this,
107 $this->serviceName,
108 'customClasses',
109 [
110 'methods' => [
111 'create' => [
112 'path' => 'v1/{+parent}/customClasses',
113 'httpMethod' => 'POST',
114 'parameters' => [
115 'parent' => [
116 'location' => 'path',
117 'type' => 'string',
118 'required' => true,
119 ],
120 ],
121 ],'delete' => [
122 'path' => 'v1/{+name}',
123 'httpMethod' => 'DELETE',
124 'parameters' => [
125 'name' => [
126 'location' => 'path',
127 'type' => 'string',
128 'required' => true,
129 ],
130 ],
131 ],'get' => [
132 'path' => 'v1/{+name}',
133 'httpMethod' => 'GET',
134 'parameters' => [
135 'name' => [
136 'location' => 'path',
137 'type' => 'string',
138 'required' => true,
139 ],
140 ],
141 ],'list' => [
142 'path' => 'v1/{+parent}/customClasses',
143 'httpMethod' => 'GET',
144 'parameters' => [
145 'parent' => [
146 'location' => 'path',
147 'type' => 'string',
148 'required' => true,
149 ],
150 'pageSize' => [
151 'location' => 'query',
152 'type' => 'integer',
153 ],
154 'pageToken' => [
155 'location' => 'query',
156 'type' => 'string',
157 ],
158 ],
159 ],'patch' => [
160 'path' => 'v1/{+name}',
161 'httpMethod' => 'PATCH',
162 'parameters' => [
163 'name' => [
164 'location' => 'path',
165 'type' => 'string',
166 'required' => true,
167 ],
168 'updateMask' => [
169 'location' => 'query',
170 'type' => 'string',
171 ],
172 ],
173 ],
174 ]
175 ]
176 );
177 $this->projects_locations_phraseSets = new Speech\Resource\ProjectsLocationsPhraseSets(
178 $this,
179 $this->serviceName,
180 'phraseSets',
181 [
182 'methods' => [
183 'create' => [
184 'path' => 'v1/{+parent}/phraseSets',
185 'httpMethod' => 'POST',
186 'parameters' => [
187 'parent' => [
188 'location' => 'path',
189 'type' => 'string',
190 'required' => true,
191 ],
192 ],
193 ],'delete' => [
194 'path' => 'v1/{+name}',
195 'httpMethod' => 'DELETE',
196 'parameters' => [
197 'name' => [
198 'location' => 'path',
199 'type' => 'string',
200 'required' => true,
201 ],
202 ],
203 ],'get' => [
204 'path' => 'v1/{+name}',
205 'httpMethod' => 'GET',
206 'parameters' => [
207 'name' => [
208 'location' => 'path',
209 'type' => 'string',
210 'required' => true,
211 ],
212 ],
213 ],'list' => [
214 'path' => 'v1/{+parent}/phraseSets',
215 'httpMethod' => 'GET',
216 'parameters' => [
217 'parent' => [
218 'location' => 'path',
219 'type' => 'string',
220 'required' => true,
221 ],
222 'pageSize' => [
223 'location' => 'query',
224 'type' => 'integer',
225 ],
226 'pageToken' => [
227 'location' => 'query',
228 'type' => 'string',
229 ],
230 ],
231 ],'patch' => [
232 'path' => 'v1/{+name}',
233 'httpMethod' => 'PATCH',
234 'parameters' => [
235 'name' => [
236 'location' => 'path',
237 'type' => 'string',
238 'required' => true,
239 ],
240 'updateMask' => [
241 'location' => 'query',
242 'type' => 'string',
243 ],
244 ],
245 ],
246 ]
247 ]
248 );
249 $this->speech = new Speech\Resource\Speech(
250 $this,
251 $this->serviceName,
252 'speech',
253 [
254 'methods' => [
255 'longrunningrecognize' => [
256 'path' => 'v1/speech:longrunningrecognize',
257 'httpMethod' => 'POST',
258 'parameters' => [],
259 ],'recognize' => [
260 'path' => 'v1/speech:recognize',
261 'httpMethod' => 'POST',
262 'parameters' => [],
263 ],
264 ]
265 ]
266 );
267 }
268}
269
270// Adding a class alias for backwards compatibility with the previous class name.
271class_alias(Speech::class, 'Google_Service_Speech');
Note: See TracBrowser for help on using the repository browser.