Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
feat: add support for speaker tag field (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and callmehiphop committed Nov 13, 2019
1 parent ebcd0d3 commit a027563
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 5 deletions.
4 changes: 4 additions & 0 deletions protos/google/cloud/speech/v1/cloud_speech.proto
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,10 @@ message SpeakerDiarizationConfig {
// flexibility by allowing the system to automatically determine the correct
// number of speakers. If not set, the default value is 6.
int32 max_speaker_count = 3;

// Unused.
int32 speaker_tag = 5
[(google.api.field_behavior) = OUTPUT_ONLY, deprecated = true];
}

// Description of audio data to be recognized.
Expand Down
7 changes: 7 additions & 0 deletions protos/protos.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as Long from "long";
import * as $protobuf from "protobufjs";
/** Namespace google. */
export namespace google {
Expand Down Expand Up @@ -685,6 +686,9 @@ export namespace google {

/** SpeakerDiarizationConfig maxSpeakerCount */
maxSpeakerCount?: (number|null);

/** SpeakerDiarizationConfig speakerTag */
speakerTag?: (number|null);
}

/** Represents a SpeakerDiarizationConfig. */
Expand All @@ -705,6 +709,9 @@ export namespace google {
/** SpeakerDiarizationConfig maxSpeakerCount. */
public maxSpeakerCount: number;

/** SpeakerDiarizationConfig speakerTag. */
public speakerTag: number;

/**
* Creates a new SpeakerDiarizationConfig instance using the specified properties.
* @param [properties] Properties to set
Expand Down
22 changes: 22 additions & 0 deletions protos/protos.js
Original file line number Diff line number Diff line change
Expand Up @@ -1689,6 +1689,7 @@
* @property {boolean|null} [enableSpeakerDiarization] SpeakerDiarizationConfig enableSpeakerDiarization
* @property {number|null} [minSpeakerCount] SpeakerDiarizationConfig minSpeakerCount
* @property {number|null} [maxSpeakerCount] SpeakerDiarizationConfig maxSpeakerCount
* @property {number|null} [speakerTag] SpeakerDiarizationConfig speakerTag
*/

/**
Expand Down Expand Up @@ -1730,6 +1731,14 @@
*/
SpeakerDiarizationConfig.prototype.maxSpeakerCount = 0;

/**
* SpeakerDiarizationConfig speakerTag.
* @member {number} speakerTag
* @memberof google.cloud.speech.v1.SpeakerDiarizationConfig
* @instance
*/
SpeakerDiarizationConfig.prototype.speakerTag = 0;

/**
* Creates a new SpeakerDiarizationConfig instance using the specified properties.
* @function create
Expand Down Expand Up @@ -1760,6 +1769,8 @@
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minSpeakerCount);
if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount"))
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxSpeakerCount);
if (message.speakerTag != null && message.hasOwnProperty("speakerTag"))
writer.uint32(/* id 5, wireType 0 =*/40).int32(message.speakerTag);
return writer;
};

Expand Down Expand Up @@ -1803,6 +1814,9 @@
case 3:
message.maxSpeakerCount = reader.int32();
break;
case 5:
message.speakerTag = reader.int32();
break;
default:
reader.skipType(tag & 7);
break;
Expand Down Expand Up @@ -1847,6 +1861,9 @@
if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount"))
if (!$util.isInteger(message.maxSpeakerCount))
return "maxSpeakerCount: integer expected";
if (message.speakerTag != null && message.hasOwnProperty("speakerTag"))
if (!$util.isInteger(message.speakerTag))
return "speakerTag: integer expected";
return null;
};

Expand All @@ -1868,6 +1885,8 @@
message.minSpeakerCount = object.minSpeakerCount | 0;
if (object.maxSpeakerCount != null)
message.maxSpeakerCount = object.maxSpeakerCount | 0;
if (object.speakerTag != null)
message.speakerTag = object.speakerTag | 0;
return message;
};

Expand All @@ -1888,13 +1907,16 @@
object.enableSpeakerDiarization = false;
object.minSpeakerCount = 0;
object.maxSpeakerCount = 0;
object.speakerTag = 0;
}
if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization"))
object.enableSpeakerDiarization = message.enableSpeakerDiarization;
if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount"))
object.minSpeakerCount = message.minSpeakerCount;
if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount"))
object.maxSpeakerCount = message.maxSpeakerCount;
if (message.speakerTag != null && message.hasOwnProperty("speakerTag"))
object.speakerTag = message.speakerTag;
return object;
};

Expand Down
8 changes: 8 additions & 0 deletions protos/protos.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,14 @@
"maxSpeakerCount": {
"type": "int32",
"id": 3
},
"speakerTag": {
"type": "int32",
"id": 5,
"options": {
"(google.api.field_behavior)": "OUTPUT_ONLY",
"deprecated": true
}
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/v1/doc/google/cloud/speech/v1/doc_cloud_speech.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ const RecognitionConfig = {
* flexibility by allowing the system to automatically determine the correct
* number of speakers. If not set, the default value is 6.
*
* @property {number} speakerTag
* Unused.
*
* @typedef SpeakerDiarizationConfig
* @memberof google.cloud.speech.v1
* @see [google.cloud.speech.v1.SpeakerDiarizationConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/speech/v1/cloud_speech.proto}
Expand Down
10 changes: 5 additions & 5 deletions synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-11-05T12:24:30.110582Z",
"updateTime": "2019-11-12T12:26:09.359643Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.41.0",
"dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9"
"version": "0.41.1",
"dockerImage": "googleapis/artman@sha256:545c758c76c3f779037aa259023ec3d1ef2d57d2c8cd00a222cb187d63ceac5e"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "8c6569ced063c08a48272de2e887860d0c40d388",
"internalRef": "278552094"
"sha": "f69562be0608904932bdcfbc5ad8b9a22d9dceb8",
"internalRef": "279774957"
}
},
{
Expand Down

0 comments on commit a027563

Please sign in to comment.