Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

feat: add speaker_tag to WordInfo #40

Merged
merged 2 commits into from Nov 12, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -21,7 +21,7 @@ If you are still having issues, please include as much information as possible:
General, Core, and Other are also allowed as types
2. OS type and version:
3. Java version:
4. google-cloud-speect version(s):
4. google-cloud-speech version(s):

#### Steps to reproduce

Expand Down
2 changes: 1 addition & 1 deletion .kokoro/continuous/propose_release.sh
Expand Up @@ -22,7 +22,7 @@ if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; th
# Groom the release PR as new commits are merged.
npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \
--repo-url=googleapis/java-speech \
--package-name="google-cloud-speect" \
--package-name="google-cloud-speech" \
--api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \
--proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \
--release-type=java-yoshi
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/bump_snapshot.sh
Expand Up @@ -22,7 +22,7 @@ if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; th
# Groom the snapshot release PR immediately after publishing a release
npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \
--repo-url=googleapis/java-speech \
--package-name="google-cloud-speect" \
--package-name="google-cloud-speech" \
--api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \
--proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \
--snapshot \
Expand Down
3 changes: 0 additions & 3 deletions .kokoro/release/drop.cfg
Expand Up @@ -4,6 +4,3 @@ env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-speech/.kokoro/release/drop.sh"
}

# Download staging properties file.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/java-speech"
4 changes: 0 additions & 4 deletions .kokoro/release/promote.cfg
Expand Up @@ -4,7 +4,3 @@ env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-speech/.kokoro/release/promote.sh"
}

# Download staging properties file.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/java-speech"

2 changes: 1 addition & 1 deletion .kokoro/release/publish_javadoc.sh
Expand Up @@ -33,7 +33,7 @@ python3 -m pip install gcp-docuploader
# compile all packages
mvn clean install -B -DskipTests=true

NAME=google-cloud-speect
NAME=google-cloud-speech
VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)

# build the docs
Expand Down
Expand Up @@ -53,7 +53,7 @@ public static void executeNoCatch() throws Exception {
.setSampleRateHertz(sampleRateHertz)
.setEncoding(encoding)
.build();
String uri = "gs://gapic-toolkit/hello.flac";
String uri = "gs://cloud-samples-data/speech/brooklyn_bridge.flac";
RecognitionAudio audio = RecognitionAudio.newBuilder().setUri(uri).build();

RecognizeResponse response = client.recognize(config, audio);
Expand Down
Expand Up @@ -53,7 +53,7 @@ public static void executeNoCatch() throws Exception {
.setSampleRateHertz(sampleRateHertz)
.setEncoding(encoding)
.build();
String uri = "gs://gapic-toolkit/hello.flac";
String uri = "gs://cloud-samples-data/speech/brooklyn_bridge.flac";
RecognitionAudio audio = RecognitionAudio.newBuilder().setUri(uri).build();

RecognizeResponse response = client.recognize(config, audio);
Expand Down
Expand Up @@ -174,15 +174,13 @@ public int getMaxSpeakerCount() {
*
*
* <pre>
* A distinct integer value is assigned for every speaker within
* the audio. This field specifies which one of those speakers was detected to
* have spoken this word. Value ranges from '1' to diarization_speaker_count.
* speaker_tag is set if enable_speaker_diarization = 'true' and only in the
* top alternative.
* Unused.
* </pre>
*
* <code>int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* <code>int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
* </code>
*/
@java.lang.Deprecated
public int getSpeakerTag() {
return speakerTag_;
}
Expand Down Expand Up @@ -704,31 +702,27 @@ public Builder clearMaxSpeakerCount() {
*
*
* <pre>
* A distinct integer value is assigned for every speaker within
* the audio. This field specifies which one of those speakers was detected to
* have spoken this word. Value ranges from '1' to diarization_speaker_count.
* speaker_tag is set if enable_speaker_diarization = 'true' and only in the
* top alternative.
* Unused.
* </pre>
*
* <code>int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* <code>int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
* </code>
*/
@java.lang.Deprecated
public int getSpeakerTag() {
return speakerTag_;
}
/**
*
*
* <pre>
* A distinct integer value is assigned for every speaker within
* the audio. This field specifies which one of those speakers was detected to
* have spoken this word. Value ranges from '1' to diarization_speaker_count.
* speaker_tag is set if enable_speaker_diarization = 'true' and only in the
* top alternative.
* Unused.
* </pre>
*
* <code>int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* <code>int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
* </code>
*/
@java.lang.Deprecated
public Builder setSpeakerTag(int value) {

speakerTag_ = value;
Expand All @@ -739,15 +733,13 @@ public Builder setSpeakerTag(int value) {
*
*
* <pre>
* A distinct integer value is assigned for every speaker within
* the audio. This field specifies which one of those speakers was detected to
* have spoken this word. Value ranges from '1' to diarization_speaker_count.
* speaker_tag is set if enable_speaker_diarization = 'true' and only in the
* top alternative.
* Unused.
* </pre>
*
* <code>int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* <code>int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
* </code>
*/
@java.lang.Deprecated
public Builder clearSpeakerTag() {

speakerTag_ = 0;
Expand Down
Expand Up @@ -66,14 +66,12 @@ public interface SpeakerDiarizationConfigOrBuilder
*
*
* <pre>
* A distinct integer value is assigned for every speaker within
* the audio. This field specifies which one of those speakers was detected to
* have spoken this word. Value ranges from '1' to diarization_speaker_count.
* speaker_tag is set if enable_speaker_diarization = 'true' and only in the
* top alternative.
* Unused.
* </pre>
*
* <code>int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* <code>int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
* </code>
*/
@java.lang.Deprecated
int getSpeakerTag();
}
Expand Up @@ -145,89 +145,90 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "ioEncoding\022\030\n\024ENCODING_UNSPECIFIED\020\000\022\014\n\010"
+ "LINEAR16\020\001\022\010\n\004FLAC\020\002\022\t\n\005MULAW\020\003\022\007\n\003AMR\020\004"
+ "\022\n\n\006AMR_WB\020\005\022\014\n\010OGG_OPUS\020\006\022\032\n\026SPEEX_WITH"
+ "_HEADER_BYTE\020\007\"\216\001\n\030SpeakerDiarizationCon"
+ "_HEADER_BYTE\020\007\"\220\001\n\030SpeakerDiarizationCon"
+ "fig\022\"\n\032enable_speaker_diarization\030\001 \001(\010\022"
+ "\031\n\021min_speaker_count\030\002 \001(\005\022\031\n\021max_speake"
+ "r_count\030\003 \001(\005\022\030\n\013speaker_tag\030\005 \001(\005B\003\340A\003\""
+ "\240\010\n\023RecognitionMetadata\022U\n\020interaction_t"
+ "ype\030\001 \001(\0162;.google.cloud.speech.v1.Recog"
+ "nitionMetadata.InteractionType\022$\n\034indust"
+ "ry_naics_code_of_audio\030\003 \001(\r\022[\n\023micropho"
+ "ne_distance\030\004 \001(\0162>.google.cloud.speech."
+ "v1.RecognitionMetadata.MicrophoneDistanc"
+ "e\022Z\n\023original_media_type\030\005 \001(\0162=.google."
+ "cloud.speech.v1.RecognitionMetadata.Orig"
+ "inalMediaType\022^\n\025recording_device_type\030\006"
+ " \001(\0162?.google.cloud.speech.v1.Recognitio"
+ "nMetadata.RecordingDeviceType\022\035\n\025recordi"
+ "ng_device_name\030\007 \001(\t\022\032\n\022original_mime_ty"
+ "pe\030\010 \001(\t\022\023\n\013audio_topic\030\n \001(\t\"\305\001\n\017Intera"
+ "ctionType\022 \n\034INTERACTION_TYPE_UNSPECIFIE"
+ "D\020\000\022\016\n\nDISCUSSION\020\001\022\020\n\014PRESENTATION\020\002\022\016\n"
+ "\nPHONE_CALL\020\003\022\r\n\tVOICEMAIL\020\004\022\033\n\027PROFESSI"
+ "ONALLY_PRODUCED\020\005\022\020\n\014VOICE_SEARCH\020\006\022\021\n\rV"
+ "OICE_COMMAND\020\007\022\r\n\tDICTATION\020\010\"d\n\022Microph"
+ "oneDistance\022#\n\037MICROPHONE_DISTANCE_UNSPE"
+ "CIFIED\020\000\022\r\n\tNEARFIELD\020\001\022\014\n\010MIDFIELD\020\002\022\014\n"
+ "\010FARFIELD\020\003\"N\n\021OriginalMediaType\022#\n\037ORIG"
+ "INAL_MEDIA_TYPE_UNSPECIFIED\020\000\022\t\n\005AUDIO\020\001"
+ "\022\t\n\005VIDEO\020\002\"\244\001\n\023RecordingDeviceType\022%\n!R"
+ "ECORDING_DEVICE_TYPE_UNSPECIFIED\020\000\022\016\n\nSM"
+ "ARTPHONE\020\001\022\006\n\002PC\020\002\022\016\n\nPHONE_LINE\020\003\022\013\n\007VE"
+ "HICLE\020\004\022\030\n\024OTHER_OUTDOOR_DEVICE\020\005\022\027\n\023OTH"
+ "ER_INDOOR_DEVICE\020\006\" \n\rSpeechContext\022\017\n\007p"
+ "hrases\030\001 \003(\t\"D\n\020RecognitionAudio\022\021\n\007cont"
+ "ent\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\tH\000B\016\n\014audio_sour"
+ "ce\"U\n\021RecognizeResponse\022@\n\007results\030\002 \003(\013"
+ "2/.google.cloud.speech.v1.SpeechRecognit"
+ "ionResult\"`\n\034LongRunningRecognizeRespons"
+ "e\022@\n\007results\030\002 \003(\0132/.google.cloud.speech"
+ ".v1.SpeechRecognitionResult\"\236\001\n\034LongRunn"
+ "ingRecognizeMetadata\022\030\n\020progress_percent"
+ "\030\001 \001(\005\022.\n\nstart_time\030\002 \001(\0132\032.google.prot"
+ "obuf.Timestamp\0224\n\020last_update_time\030\003 \001(\013"
+ "2\032.google.protobuf.Timestamp\"\261\002\n\032Streami"
+ "ngRecognizeResponse\022!\n\005error\030\001 \001(\0132\022.goo"
+ "gle.rpc.Status\022C\n\007results\030\002 \003(\01322.google"
+ ".cloud.speech.v1.StreamingRecognitionRes"
+ "ult\022]\n\021speech_event_type\030\004 \001(\0162B.google."
+ "cloud.speech.v1.StreamingRecognizeRespon"
+ "se.SpeechEventType\"L\n\017SpeechEventType\022\034\n"
+ "\030SPEECH_EVENT_UNSPECIFIED\020\000\022\033\n\027END_OF_SI"
+ "NGLE_UTTERANCE\020\001\"\362\001\n\032StreamingRecognitio"
+ "nResult\022J\n\014alternatives\030\001 \003(\01324.google.c"
+ "loud.speech.v1.SpeechRecognitionAlternat"
+ "ive\022\020\n\010is_final\030\002 \001(\010\022\021\n\tstability\030\003 \001(\002"
+ "\0222\n\017result_end_time\030\004 \001(\0132\031.google.proto"
+ "buf.Duration\022\023\n\013channel_tag\030\005 \001(\005\022\032\n\rlan"
+ "guage_code\030\006 \001(\tB\003\340A\003\"z\n\027SpeechRecogniti"
+ "onResult\022J\n\014alternatives\030\001 \003(\01324.google."
+ "cloud.speech.v1.SpeechRecognitionAlterna"
+ "tive\022\023\n\013channel_tag\030\002 \001(\005\"w\n\034SpeechRecog"
+ "nitionAlternative\022\022\n\ntranscript\030\001 \001(\t\022\022\n"
+ "\nconfidence\030\002 \001(\002\022/\n\005words\030\003 \003(\0132 .googl"
+ "e.cloud.speech.v1.WordInfo\"t\n\010WordInfo\022-"
+ "\n\nstart_time\030\001 \001(\0132\031.google.protobuf.Dur"
+ "ation\022+\n\010end_time\030\002 \001(\0132\031.google.protobu"
+ "f.Duration\022\014\n\004word\030\003 \001(\t2\321\004\n\006Speech\022\220\001\n\t"
+ "Recognize\022(.google.cloud.speech.v1.Recog"
+ "nizeRequest\032).google.cloud.speech.v1.Rec"
+ "ognizeResponse\".\202\323\344\223\002\031\"\024/v1/speech:recog"
+ "nize:\001*\332A\014config,audio\022\344\001\n\024LongRunningRe"
+ "cognize\0223.google.cloud.speech.v1.LongRun"
+ "ningRecognizeRequest\032\035.google.longrunnin"
+ "g.Operation\"x\202\323\344\223\002$\"\037/v1/speech:longrunn"
+ "ingrecognize:\001*\332A\014config,audio\312A<\n\034LongR"
+ "unningRecognizeResponse\022\034LongRunningReco"
+ "gnizeMetadata\022\201\001\n\022StreamingRecognize\0221.g"
+ "r_count\030\003 \001(\005\022\032\n\013speaker_tag\030\005 \001(\005B\005\030\001\340A"
+ "\003\"\240\010\n\023RecognitionMetadata\022U\n\020interaction"
+ "_type\030\001 \001(\0162;.google.cloud.speech.v1.Rec"
+ "ognitionMetadata.InteractionType\022$\n\034indu"
+ "stry_naics_code_of_audio\030\003 \001(\r\022[\n\023microp"
+ "hone_distance\030\004 \001(\0162>.google.cloud.speec"
+ "h.v1.RecognitionMetadata.MicrophoneDista"
+ "nce\022Z\n\023original_media_type\030\005 \001(\0162=.googl"
+ "e.cloud.speech.v1.RecognitionMetadata.Or"
+ "iginalMediaType\022^\n\025recording_device_type"
+ "\030\006 \001(\0162?.google.cloud.speech.v1.Recognit"
+ "ionMetadata.RecordingDeviceType\022\035\n\025recor"
+ "ding_device_name\030\007 \001(\t\022\032\n\022original_mime_"
+ "type\030\010 \001(\t\022\023\n\013audio_topic\030\n \001(\t\"\305\001\n\017Inte"
+ "ractionType\022 \n\034INTERACTION_TYPE_UNSPECIF"
+ "IED\020\000\022\016\n\nDISCUSSION\020\001\022\020\n\014PRESENTATION\020\002\022"
+ "\016\n\nPHONE_CALL\020\003\022\r\n\tVOICEMAIL\020\004\022\033\n\027PROFES"
+ "SIONALLY_PRODUCED\020\005\022\020\n\014VOICE_SEARCH\020\006\022\021\n"
+ "\rVOICE_COMMAND\020\007\022\r\n\tDICTATION\020\010\"d\n\022Micro"
+ "phoneDistance\022#\n\037MICROPHONE_DISTANCE_UNS"
+ "PECIFIED\020\000\022\r\n\tNEARFIELD\020\001\022\014\n\010MIDFIELD\020\002\022"
+ "\014\n\010FARFIELD\020\003\"N\n\021OriginalMediaType\022#\n\037OR"
+ "IGINAL_MEDIA_TYPE_UNSPECIFIED\020\000\022\t\n\005AUDIO"
+ "\020\001\022\t\n\005VIDEO\020\002\"\244\001\n\023RecordingDeviceType\022%\n"
+ "!RECORDING_DEVICE_TYPE_UNSPECIFIED\020\000\022\016\n\n"
+ "SMARTPHONE\020\001\022\006\n\002PC\020\002\022\016\n\nPHONE_LINE\020\003\022\013\n\007"
+ "VEHICLE\020\004\022\030\n\024OTHER_OUTDOOR_DEVICE\020\005\022\027\n\023O"
+ "THER_INDOOR_DEVICE\020\006\" \n\rSpeechContext\022\017\n"
+ "\007phrases\030\001 \003(\t\"D\n\020RecognitionAudio\022\021\n\007co"
+ "ntent\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\tH\000B\016\n\014audio_so"
+ "urce\"U\n\021RecognizeResponse\022@\n\007results\030\002 \003"
+ "(\0132/.google.cloud.speech.v1.SpeechRecogn"
+ "itionResult\"`\n\034LongRunningRecognizeRespo"
+ "nse\022@\n\007results\030\002 \003(\0132/.google.cloud.spee"
+ "ch.v1.SpeechRecognitionResult\"\236\001\n\034LongRu"
+ "nningRecognizeMetadata\022\030\n\020progress_perce"
+ "nt\030\001 \001(\005\022.\n\nstart_time\030\002 \001(\0132\032.google.pr"
+ "otobuf.Timestamp\0224\n\020last_update_time\030\003 \001"
+ "(\0132\032.google.protobuf.Timestamp\"\261\002\n\032Strea"
+ "mingRecognizeResponse\022!\n\005error\030\001 \001(\0132\022.g"
+ "oogle.rpc.Status\022C\n\007results\030\002 \003(\01322.goog"
+ "le.cloud.speech.v1.StreamingRecognitionR"
+ "esult\022]\n\021speech_event_type\030\004 \001(\0162B.googl"
+ "e.cloud.speech.v1.StreamingRecognizeResp"
+ "onse.SpeechEventType\"L\n\017SpeechEventType\022"
+ "\034\n\030SPEECH_EVENT_UNSPECIFIED\020\000\022\033\n\027END_OF_"
+ "SINGLE_UTTERANCE\020\001\"\362\001\n\032StreamingRecognit"
+ "ionResult\022J\n\014alternatives\030\001 \003(\01324.google"
+ ".cloud.speech.v1.SpeechRecognitionAltern"
+ "ative\022\020\n\010is_final\030\002 \001(\010\022\021\n\tstability\030\003 \001"
+ "(\002\0222\n\017result_end_time\030\004 \001(\0132\031.google.pro"
+ "tobuf.Duration\022\023\n\013channel_tag\030\005 \001(\005\022\032\n\rl"
+ "anguage_code\030\006 \001(\tB\003\340A\003\"z\n\027SpeechRecogni"
+ "tionResult\022J\n\014alternatives\030\001 \003(\01324.googl"
+ "e.cloud.speech.v1.SpeechRecognitionAlter"
+ "native\022\023\n\013channel_tag\030\002 \001(\005\"w\n\034SpeechRec"
+ "ognitionAlternative\022\022\n\ntranscript\030\001 \001(\t\022"
+ "\022\n\nconfidence\030\002 \001(\002\022/\n\005words\030\003 \003(\0132 .goo"
+ "gle.cloud.speech.v1.WordInfo\"\216\001\n\010WordInf"
+ "o\022-\n\nstart_time\030\001 \001(\0132\031.google.protobuf."
+ "Duration\022+\n\010end_time\030\002 \001(\0132\031.google.prot"
+ "obuf.Duration\022\014\n\004word\030\003 \001(\t\022\030\n\013speaker_t"
+ "ag\030\005 \001(\005B\003\340A\0032\321\004\n\006Speech\022\220\001\n\tRecognize\022("
+ ".google.cloud.speech.v1.RecognizeRequest"
+ "\032).google.cloud.speech.v1.RecognizeRespo"
+ "nse\".\202\323\344\223\002\031\"\024/v1/speech:recognize:\001*\332A\014c"
+ "onfig,audio\022\344\001\n\024LongRunningRecognize\0223.g"
+ "oogle.cloud.speech.v1.LongRunningRecogni"
+ "zeRequest\032\035.google.longrunning.Operation"
+ "\"x\202\323\344\223\002$\"\037/v1/speech:longrunningrecogniz"
+ "e:\001*\332A\014config,audio\312A<\n\034LongRunningRecog"
+ "nizeResponse\022\034LongRunningRecognizeMetada"
+ "ta\022\201\001\n\022StreamingRecognize\0221.google.cloud"
+ ".speech.v1.StreamingRecognizeRequest\0322.g"
+ "oogle.cloud.speech.v1.StreamingRecognize"
+ "Request\0322.google.cloud.speech.v1.Streami"
+ "ngRecognizeResponse\"\000(\0010\001\032I\312A\025speech.goo"
+ "gleapis.com\322A.https://www.googleapis.com"
+ "/auth/cloud-platformBr\n\032com.google.cloud"
+ ".speech.v1B\013SpeechProtoP\001Z<google.golang"
+ ".org/genproto/googleapis/cloud/speech/v1"
+ ";speech\370\001\001\242\002\003GCSb\006proto3"
+ "Response\"\000(\0010\001\032I\312A\025speech.googleapis.com"
+ "\322A.https://www.googleapis.com/auth/cloud"
+ "-platformBr\n\032com.google.cloud.speech.v1B"
+ "\013SpeechProtoP\001Z<google.golang.org/genpro"
+ "to/googleapis/cloud/speech/v1;speech\370\001\001\242"
+ "\002\003GCSb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
Expand Down Expand Up @@ -404,7 +405,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_speech_v1_WordInfo_descriptor,
new java.lang.String[] {
"StartTime", "EndTime", "Word",
"StartTime", "EndTime", "Word", "SpeakerTag",
});
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
Expand Down