1{
2  "auth": {
3    "oauth2": {
4      "scopes": {
5        "https://www.googleapis.com/auth/cloud-platform": {
6          "description": "View and manage your data across Google Cloud Platform services"
7        }
8      }
9    }
10  },
11  "basePath": "",
12  "baseUrl": "https://speech.googleapis.com/",
13  "batchPath": "batch",
14  "canonicalName": "Speech",
15  "description": "Converts audio to text by applying powerful neural network models.",
16  "discoveryVersion": "v1",
17  "documentationLink": "https://cloud.google.com/speech-to-text/docs/quickstart-protocol",
18  "fullyEncodeReservedExpansion": true,
19  "icons": {
20    "x16": "http://www.google.com/images/icons/product/search-16.gif",
21    "x32": "http://www.google.com/images/icons/product/search-32.gif"
22  },
23  "id": "speech:v1beta1",
24  "kind": "discovery#restDescription",
25  "name": "speech",
26  "ownerDomain": "google.com",
27  "ownerName": "Google",
28  "parameters": {
29    "$.xgafv": {
30      "description": "V1 error format.",
31      "enum": [
32        "1",
33        "2"
34      ],
35      "enumDescriptions": [
36        "v1 error format",
37        "v2 error format"
38      ],
39      "location": "query",
40      "type": "string"
41    },
42    "access_token": {
43      "description": "OAuth access token.",
44      "location": "query",
45      "type": "string"
46    },
47    "alt": {
48      "default": "json",
49      "description": "Data format for response.",
50      "enum": [
51        "json",
52        "media",
53        "proto"
54      ],
55      "enumDescriptions": [
56        "Responses with Content-Type of application/json",
57        "Media download with context-dependent Content-Type",
58        "Responses with Content-Type of application/x-protobuf"
59      ],
60      "location": "query",
61      "type": "string"
62    },
63    "callback": {
64      "description": "JSONP",
65      "location": "query",
66      "type": "string"
67    },
68    "fields": {
69      "description": "Selector specifying which fields to include in a partial response.",
70      "location": "query",
71      "type": "string"
72    },
73    "key": {
74      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
75      "location": "query",
76      "type": "string"
77    },
78    "oauth_token": {
79      "description": "OAuth 2.0 token for the current user.",
80      "location": "query",
81      "type": "string"
82    },
83    "prettyPrint": {
84      "default": "true",
85      "description": "Returns response with indentations and line breaks.",
86      "location": "query",
87      "type": "boolean"
88    },
89    "quotaUser": {
90      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
91      "location": "query",
92      "type": "string"
93    },
94    "uploadType": {
95      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
96      "location": "query",
97      "type": "string"
98    },
99    "upload_protocol": {
100      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
101      "location": "query",
102      "type": "string"
103    }
104  },
105  "protocol": "rest",
106  "resources": {
107    "operations": {
108      "methods": {
109        "get": {
110          "description": "Gets the latest state of a long-running operation.  Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
111          "flatPath": "v1beta1/operations/{operationsId}",
112          "httpMethod": "GET",
113          "id": "speech.operations.get",
114          "parameterOrder": [
115            "name"
116          ],
117          "parameters": {
118            "name": {
119              "description": "The name of the operation resource.",
120              "location": "path",
121              "pattern": "^[^/]+$",
122              "required": true,
123              "type": "string"
124            }
125          },
126          "path": "v1beta1/operations/{+name}",
127          "response": {
128            "$ref": "Operation"
129          },
130          "scopes": [
131            "https://www.googleapis.com/auth/cloud-platform"
132          ]
133        },
134        "list": {
135          "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
136          "flatPath": "v1beta1/operations",
137          "httpMethod": "GET",
138          "id": "speech.operations.list",
139          "parameterOrder": [],
140          "parameters": {
141            "filter": {
142              "description": "The standard list filter.",
143              "location": "query",
144              "type": "string"
145            },
146            "name": {
147              "description": "The name of the operation's parent resource.",
148              "location": "query",
149              "type": "string"
150            },
151            "pageSize": {
152              "description": "The standard list page size.",
153              "format": "int32",
154              "location": "query",
155              "type": "integer"
156            },
157            "pageToken": {
158              "description": "The standard list page token.",
159              "location": "query",
160              "type": "string"
161            }
162          },
163          "path": "v1beta1/operations",
164          "response": {
165            "$ref": "ListOperationsResponse"
166          },
167          "scopes": [
168            "https://www.googleapis.com/auth/cloud-platform"
169          ]
170        }
171      }
172    },
173    "speech": {
174      "methods": {
175        "asyncrecognize": {
176          "description": "Performs asynchronous speech recognition: receive results via the\n[google.longrunning.Operations]\n(/speech/reference/rest/v1beta1/operations#Operation)\ninterface. Returns either an\n`Operation.error` or an `Operation.response` which contains\nan `AsyncRecognizeResponse` message.",
177          "flatPath": "v1beta1/speech:asyncrecognize",
178          "httpMethod": "POST",
179          "id": "speech.speech.asyncrecognize",
180          "parameterOrder": [],
181          "parameters": {},
182          "path": "v1beta1/speech:asyncrecognize",
183          "request": {
184            "$ref": "AsyncRecognizeRequest"
185          },
186          "response": {
187            "$ref": "Operation"
188          },
189          "scopes": [
190            "https://www.googleapis.com/auth/cloud-platform"
191          ]
192        },
193        "syncrecognize": {
194          "description": "Performs synchronous speech recognition: receive results after all audio\nhas been sent and processed.",
195          "flatPath": "v1beta1/speech:syncrecognize",
196          "httpMethod": "POST",
197          "id": "speech.speech.syncrecognize",
198          "parameterOrder": [],
199          "parameters": {},
200          "path": "v1beta1/speech:syncrecognize",
201          "request": {
202            "$ref": "SyncRecognizeRequest"
203          },
204          "response": {
205            "$ref": "SyncRecognizeResponse"
206          },
207          "scopes": [
208            "https://www.googleapis.com/auth/cloud-platform"
209          ]
210        }
211      }
212    }
213  },
214  "revision": "20180911",
215  "rootUrl": "https://speech.googleapis.com/",
216  "schemas": {
217    "AsyncRecognizeRequest": {
218      "description": "The top-level message sent by the client for the `AsyncRecognize` method.",
219      "id": "AsyncRecognizeRequest",
220      "properties": {
221        "audio": {
222          "$ref": "RecognitionAudio",
223          "description": "*Required* The audio data to be recognized."
224        },
225        "config": {
226          "$ref": "RecognitionConfig",
227          "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request."
228        }
229      },
230      "type": "object"
231    },
232    "ListOperationsResponse": {
233      "description": "The response message for Operations.ListOperations.",
234      "id": "ListOperationsResponse",
235      "properties": {
236        "nextPageToken": {
237          "description": "The standard List next-page token.",
238          "type": "string"
239        },
240        "operations": {
241          "description": "A list of operations that matches the specified filter in the request.",
242          "items": {
243            "$ref": "Operation"
244          },
245          "type": "array"
246        }
247      },
248      "type": "object"
249    },
250    "Operation": {
251      "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.",
252      "id": "Operation",
253      "properties": {
254        "done": {
255          "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.",
256          "type": "boolean"
257        },
258        "error": {
259          "$ref": "Status",
260          "description": "The error result of the operation in case of failure or cancellation."
261        },
262        "metadata": {
263          "additionalProperties": {
264            "description": "Properties of the object. Contains field @type with type URL.",
265            "type": "any"
266          },
267          "description": "Service-specific metadata associated with the operation.  It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata.  Any method that returns a\nlong-running operation should document the metadata type, if any.",
268          "type": "object"
269        },
270        "name": {
271          "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.",
272          "type": "string"
273        },
274        "response": {
275          "additionalProperties": {
276            "description": "Properties of the object. Contains field @type with type URL.",
277            "type": "any"
278          },
279          "description": "The normal response of the operation in case of success.  If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`.  If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource.  For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name.  For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.",
280          "type": "object"
281        }
282      },
283      "type": "object"
284    },
285    "RecognitionAudio": {
286      "description": "Contains audio data in the encoding specified in the `RecognitionConfig`.\nEither `content` or `uri` must be supplied. Supplying both or neither\nreturns google.rpc.Code.INVALID_ARGUMENT. See\n[audio limits](https://cloud.google.com/speech/limits#content).",
287      "id": "RecognitionAudio",
288      "properties": {
289        "content": {
290          "description": "The audio data bytes encoded as specified in\n`RecognitionConfig`. Note: as with all bytes fields, protobuffers use a\npure binary representation, whereas JSON representations use base64.",
291          "format": "byte",
292          "type": "string"
293        },
294        "uri": {
295          "description": "URI that points to a file that contains audio data bytes as specified in\n`RecognitionConfig`. Currently, only Google Cloud Storage URIs are\nsupported, which must be specified in the following format:\n`gs://bucket_name/object_name` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](https://cloud.google.com/storage/docs/reference-uris).",
296          "type": "string"
297        }
298      },
299      "type": "object"
300    },
301    "RecognitionConfig": {
302      "description": "Provides information to the recognizer that specifies how to process the\nrequest.",
303      "id": "RecognitionConfig",
304      "properties": {
305        "encoding": {
306          "description": "*Required* Encoding of audio data sent in all `RecognitionAudio` messages.",
307          "enum": [
308            "ENCODING_UNSPECIFIED",
309            "LINEAR16",
310            "FLAC",
311            "MULAW",
312            "AMR",
313            "AMR_WB"
314          ],
315          "enumDescriptions": [
316            "Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.",
317            "Uncompressed 16-bit signed little-endian samples (Linear PCM).\nThis is the only encoding that may be used by `AsyncRecognize`.",
318            "This is the recommended encoding for `SyncRecognize` and\n`StreamingRecognize` because it uses lossless compression; therefore\nrecognition accuracy is not compromised by a lossy codec.\n\nThe stream FLAC (Free Lossless Audio Codec) encoding is specified at:\nhttp://flac.sourceforge.net/documentation.html.\n16-bit and 24-bit samples are supported.\nNot all fields in STREAMINFO are supported.",
319            "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.",
320            "Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 Hz.",
321            "Adaptive Multi-Rate Wideband codec. `sample_rate` must be 16000 Hz."
322          ],
323          "type": "string"
324        },
325        "languageCode": {
326          "description": "*Optional* The language of the supplied audio as a BCP-47 language tag.\nExample: \"en-GB\"  https://www.rfc-editor.org/rfc/bcp/bcp47.txt\nIf omitted, defaults to \"en-US\". See\n[Language Support](https://cloud.google.com/speech/docs/languages)\nfor a list of the currently supported language codes.",
327          "type": "string"
328        },
329        "maxAlternatives": {
330          "description": "*Optional* Maximum number of recognition hypotheses to be returned.\nSpecifically, the maximum number of `SpeechRecognitionAlternative` messages\nwithin each `SpeechRecognitionResult`.\nThe server may return fewer than `max_alternatives`.\nValid values are `0`-`30`. A value of `0` or `1` will return a maximum of\none. If omitted, will return a maximum of one.",
331          "format": "int32",
332          "type": "integer"
333        },
334        "profanityFilter": {
335          "description": "*Optional* If set to `true`, the server will attempt to filter out\nprofanities, replacing all but the initial character in each filtered word\nwith asterisks, e.g. \"f***\". If set to `false` or omitted, profanities\nwon't be filtered out.",
336          "type": "boolean"
337        },
338        "sampleRate": {
339          "description": "*Required* Sample rate in Hertz of the audio data sent in all\n`RecognitionAudio` messages. Valid values are: 8000-48000.\n16000 is optimal. For best results, set the sampling rate of the audio\nsource to 16000 Hz. If that's not possible, use the native sample rate of\nthe audio source (instead of re-sampling).",
340          "format": "int32",
341          "type": "integer"
342        },
343        "speechContext": {
344          "$ref": "SpeechContext",
345          "description": "*Optional* A means to provide context to assist the speech recognition."
346        }
347      },
348      "type": "object"
349    },
350    "SpeechContext": {
351      "description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases\nin the results.",
352      "id": "SpeechContext",
353      "properties": {
354        "phrases": {
355          "description": "*Optional* A list of strings containing words and phrases \"hints\" so that\nthe speech recognition is more likely to recognize them. This can be used\nto improve the accuracy for specific words and phrases, for example, if\nspecific commands are typically spoken by the user. This can also be used\nto add additional words to the vocabulary of the recognizer. See\n[usage limits](https://cloud.google.com/speech/limits#content).",
356          "items": {
357            "type": "string"
358          },
359          "type": "array"
360        }
361      },
362      "type": "object"
363    },
364    "SpeechRecognitionAlternative": {
365      "description": "Alternative hypotheses (a.k.a. n-best list).",
366      "id": "SpeechRecognitionAlternative",
367      "properties": {
368        "confidence": {
369          "description": "*Output-only* The confidence estimate between 0.0 and 1.0. A higher number\nindicates an estimated greater likelihood that the recognized words are\ncorrect. This field is typically provided only for the top hypothesis, and\nonly for `is_final=true` results. Clients should not rely on the\n`confidence` field as it is not guaranteed to be accurate, or even set, in\nany of the results.\nThe default of 0.0 is a sentinel value indicating `confidence` was not set.",
370          "format": "float",
371          "type": "number"
372        },
373        "transcript": {
374          "description": "*Output-only* Transcript text representing the words that the user spoke.",
375          "type": "string"
376        }
377      },
378      "type": "object"
379    },
380    "SpeechRecognitionResult": {
381      "description": "A speech recognition result corresponding to a portion of the audio.",
382      "id": "SpeechRecognitionResult",
383      "properties": {
384        "alternatives": {
385          "description": "*Output-only* May contain one or more recognition hypotheses (up to the\nmaximum specified in `max_alternatives`).",
386          "items": {
387            "$ref": "SpeechRecognitionAlternative"
388          },
389          "type": "array"
390        }
391      },
392      "type": "object"
393    },
394    "Status": {
395      "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed.  The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n    it may embed the `Status` in the normal response to indicate the partial\n    errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n    have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n    `Status` message should be used directly inside batch response, one for\n    each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n    results in its response, the status of those operations should be\n    represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n    be used directly after any stripping needed for security/privacy reasons.",
396      "id": "Status",
397      "properties": {
398        "code": {
399          "description": "The status code, which should be an enum value of google.rpc.Code.",
400          "format": "int32",
401          "type": "integer"
402        },
403        "details": {
404          "description": "A list of messages that carry the error details.  There is a common set of\nmessage types for APIs to use.",
405          "items": {
406            "additionalProperties": {
407              "description": "Properties of the object. Contains field @type with type URL.",
408              "type": "any"
409            },
410            "type": "object"
411          },
412          "type": "array"
413        },
414        "message": {
415          "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.",
416          "type": "string"
417        }
418      },
419      "type": "object"
420    },
421    "SyncRecognizeRequest": {
422      "description": "The top-level message sent by the client for the `SyncRecognize` method.",
423      "id": "SyncRecognizeRequest",
424      "properties": {
425        "audio": {
426          "$ref": "RecognitionAudio",
427          "description": "*Required* The audio data to be recognized."
428        },
429        "config": {
430          "$ref": "RecognitionConfig",
431          "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request."
432        }
433      },
434      "type": "object"
435    },
436    "SyncRecognizeResponse": {
437      "description": "The only message returned to the client by `SyncRecognize`. method. It\ncontains the result as zero or more sequential `SpeechRecognitionResult`\nmessages.",
438      "id": "SyncRecognizeResponse",
439      "properties": {
440        "results": {
441          "description": "*Output-only* Sequential list of transcription results corresponding to\nsequential portions of audio.",
442          "items": {
443            "$ref": "SpeechRecognitionResult"
444          },
445          "type": "array"
446        }
447      },
448      "type": "object"
449    }
450  },
451  "servicePath": "",
452  "title": "Cloud Speech API",
453  "version": "v1beta1",
454  "version_module": true
455}