Skip to content

Commit

Permalink
feat(speech): update the API
Browse files Browse the repository at this point in the history
#### speech:v1

The following keys were added:
- schemas.LongRunningRecognizeResponse.properties.outputConfig.$ref
- schemas.LongRunningRecognizeResponse.properties.outputConfig.description
- schemas.LongRunningRecognizeResponse.properties.outputError.$ref
- schemas.LongRunningRecognizeResponse.properties.outputError.description

The following keys were changed:
- schemas.RecognitionConfig.properties.encoding.enum
- schemas.RecognitionConfig.properties.encoding.enumDescriptions
  • Loading branch information
yoshi-automation authored and bcoe committed Oct 18, 2021
1 parent 6ae8dd3 commit 64dedce
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
16 changes: 13 additions & 3 deletions discovery/speech-v1.json
Expand Up @@ -212,7 +212,7 @@
}
}
},
"revision": "20210825",
"revision": "20210929",
"rootUrl": "https://speech.googleapis.com/",
"schemas": {
"ListOperationsResponse": {
Expand Down Expand Up @@ -283,6 +283,14 @@
"description": "The only message returned to the client by the `LongRunningRecognize` method. It contains the result as zero or more sequential `SpeechRecognitionResult` messages. It is included in the `result.response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.",
"id": "LongRunningRecognizeResponse",
"properties": {
"outputConfig": {
"$ref": "TranscriptOutputConfig",
"description": "Original output config if present in the request."
},
"outputError": {
"$ref": "Status",
"description": "If the transcript output fails this field contains the relevant error."
},
"results": {
"description": "Sequential list of transcription results corresponding to sequential portions of audio.",
"items": {
Expand Down Expand Up @@ -384,7 +392,8 @@
"AMR",
"AMR_WB",
"OGG_OPUS",
"SPEEX_WITH_HEADER_BYTE"
"SPEEX_WITH_HEADER_BYTE",
"WEBM_OPUS"
],
"enumDescriptions": [
"Not specified.",
Expand All @@ -394,7 +403,8 @@
"Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.",
"Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.",
"Opus encoded audio frames in Ogg container ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000.",
"Although the use of lossy encodings is not recommended, if a very low bitrate encoding is required, `OGG_OPUS` is highly preferred over Speex encoding. The [Speex](https://speex.org/) encoding supported by Cloud Speech API has a header byte in each block, as in MIME type `audio/x-speex-with-header-byte`. It is a variant of the RTP Speex encoding defined in [RFC 5574](https://tools.ietf.org/html/rfc5574). The stream is a sequence of blocks, one block per RTP packet. Each block starts with a byte containing the length of the block, in bytes, followed by one or more frames of Speex data, padded to an integral number of bytes (octets) as specified in RFC 5574. In other words, each RTP header is replaced with a single byte containing the block length. Only Speex wideband is supported. `sample_rate_hertz` must be 16000."
"Although the use of lossy encodings is not recommended, if a very low bitrate encoding is required, `OGG_OPUS` is highly preferred over Speex encoding. The [Speex](https://speex.org/) encoding supported by Cloud Speech API has a header byte in each block, as in MIME type `audio/x-speex-with-header-byte`. It is a variant of the RTP Speex encoding defined in [RFC 5574](https://tools.ietf.org/html/rfc5574). The stream is a sequence of blocks, one block per RTP packet. Each block starts with a byte containing the length of the block, in bytes, followed by one or more frames of Speex data, padded to an integral number of bytes (octets) as specified in RFC 5574. In other words, each RTP header is replaced with a single byte containing the block length. Only Speex wideband is supported. `sample_rate_hertz` must be 16000.",
"Opus encoded audio frames in WebM container ([OggOpus](https://wiki.xiph.org/OggOpus)). This is a Beta features and only available in v1p1beta1. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000."
],
"type": "string"
},
Expand Down
8 changes: 8 additions & 0 deletions src/apis/speech/v1.ts
Expand Up @@ -182,6 +182,14 @@ export namespace speech_v1 {
* The only message returned to the client by the `LongRunningRecognize` method. It contains the result as zero or more sequential `SpeechRecognitionResult` messages. It is included in the `result.response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.
*/
export interface Schema$LongRunningRecognizeResponse {
/**
* Original output config if present in the request.
*/
outputConfig?: Schema$TranscriptOutputConfig;
/**
* If the transcript output fails this field contains the relevant error.
*/
outputError?: Schema$Status;
/**
* Sequential list of transcription results corresponding to sequential portions of audio.
*/
Expand Down

0 comments on commit 64dedce

Please sign in to comment.