Skip to content

Commit 93b078a

Browse files
Google APIscopybara-github
authored andcommitted
feat: Support for spoken punctuation and spoken emojis.
PiperOrigin-RevId: 367239272
1 parent 7e91915 commit 93b078a

2 files changed

Lines changed: 39 additions & 8 deletions

File tree

google/cloud/speech/v1p1beta1/BUILD.bazel

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# This file was automatically generated by BuildFileGenerator
2+
# https://github.com/googleapis/rules_gapic/tree/master/bazel
3+
4+
# Most of the manual changes to this file will be overwritten.
5+
# It's **only** allowed to change the following rule attribute values:
6+
# - names of *_gapic_assembly_* rules
7+
# - certain parameters of *_gapic_library rules, including but not limited to:
8+
# * extra_protoc_parameters
9+
# * extra_protoc_file_parameters
10+
# The complete list of preserved parameters can be found in the source code.
211

312
# This is an API workspace, having public visibility by default makes perfect sense.
413
package(default_visibility = ["//visibility:public"])
@@ -28,6 +37,7 @@ proto_library(
2837
"@com_google_protobuf//:empty_proto",
2938
"@com_google_protobuf//:field_mask_proto",
3039
"@com_google_protobuf//:timestamp_proto",
40+
"@com_google_protobuf//:wrappers_proto",
3141
],
3242
)
3343

@@ -77,6 +87,7 @@ java_gapic_library(
7787
java_gapic_test(
7888
name = "speech_java_gapic_test_suite",
7989
test_classes = [
90+
"com.google.cloud.speech.v1p1beta1.AdaptationClientTest",
8091
"com.google.cloud.speech.v1p1beta1.SpeechClientTest",
8192
],
8293
runtime_deps = [":speech_java_gapic_test"],
@@ -121,6 +132,7 @@ go_gapic_library(
121132
srcs = [":speech_proto_with_info"],
122133
grpc_service_config = "speech_grpc_service_config.json",
123134
importpath = "cloud.google.com/go/speech/apiv1p1beta1;speech",
135+
metadata = True,
124136
service_yaml = "speech_v1p1beta1.yaml",
125137
deps = [
126138
":speech_go_proto",
@@ -144,6 +156,7 @@ go_gapic_assembly_pkg(
144156
name = "gapi-cloud-speech-v1p1beta1-go",
145157
deps = [
146158
":speech_go_gapic",
159+
":speech_go_gapic_srcjar-metadata.srcjar",
147160
":speech_go_gapic_srcjar-test.srcjar",
148161
":speech_go_proto",
149162
],
@@ -250,8 +263,8 @@ nodejs_gapic_assembly_pkg(
250263
##############################################################################
251264
load(
252265
"@com_google_googleapis_imports//:imports.bzl",
253-
"ruby_gapic_assembly_pkg",
254266
"ruby_cloud_gapic_library",
267+
"ruby_gapic_assembly_pkg",
255268
"ruby_grpc_library",
256269
"ruby_proto_library",
257270
)
@@ -271,11 +284,11 @@ ruby_cloud_gapic_library(
271284
name = "speech_ruby_gapic",
272285
srcs = [":speech_proto_with_info"],
273286
extra_protoc_parameters = [
274-
"ruby-cloud-gem-name=google-cloud-speech-v1p1beta1",
275-
"ruby-cloud-env-prefix=SPEECH",
276-
"ruby-cloud-product-url=https://cloud.google.com/speech-to-text",
277287
"ruby-cloud-api-id=speech.googleapis.com",
278288
"ruby-cloud-api-shortname=speech",
289+
"ruby-cloud-env-prefix=SPEECH",
290+
"ruby-cloud-gem-name=google-cloud-speech-v1p1beta1",
291+
"ruby-cloud-product-url=https://cloud.google.com/speech-to-text",
279292
],
280293
grpc_service_config = "speech_grpc_service_config.json",
281294
ruby_cloud_description = "Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology.",

google/cloud/speech/v1p1beta1/cloud_speech.proto

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
// Copyright 2021 Google LLC
23
//
34
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,6 +25,7 @@ import "google/longrunning/operations.proto";
2425
import "google/protobuf/any.proto";
2526
import "google/protobuf/duration.proto";
2627
import "google/protobuf/timestamp.proto";
28+
import "google/protobuf/wrappers.proto";
2729
import "google/rpc/status.proto";
2830

2931
option cc_enable_arenas = true;
@@ -316,15 +318,15 @@ message RecognitionConfig {
316318
// Speech adaptation configuration improves the accuracy of speech
317319
// recognition. When speech adaptation is set it supersedes the
318320
// `speech_contexts` field. For more information, see the [speech
319-
// adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
321+
// adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
320322
// documentation.
321323
SpeechAdaptation adaptation = 20;
322324

323325
// Array of [SpeechContext][google.cloud.speech.v1p1beta1.SpeechContext].
324326
// A means to provide context to assist the speech recognition. For more
325327
// information, see
326328
// [speech
327-
// adaptation](https://cloud.google.com/speech-to-text/docs/context-strength).
329+
// adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).
328330
repeated SpeechContext speech_contexts = 6;
329331

330332
// If `true`, the top result includes a list of words and
@@ -344,6 +346,22 @@ message RecognitionConfig {
344346
// The default 'false' value does not add punctuation to result hypotheses.
345347
bool enable_automatic_punctuation = 11;
346348

349+
// The spoken punctuation behavior for the call
350+
// If not set, uses default behavior based on model of choice
351+
// e.g. command_and_search will enable spoken punctuation by default
352+
// If 'true', replaces spoken punctuation with the corresponding symbols in
353+
// the request. For example, "how are you question mark" becomes "how are
354+
// you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
355+
// for support. If 'false', spoken punctuation is not replaced.
356+
google.protobuf.BoolValue enable_spoken_punctuation = 22;
357+
358+
// The spoken emoji behavior for the call
359+
// If not set, uses default behavior based on model of choice
360+
// If 'true', adds spoken emoji formatting for the request. This will replace
361+
// spoken emojis with the corresponding Unicode symbols in the final
362+
// transcript. If 'false', spoken emojis are not replaced.
363+
google.protobuf.BoolValue enable_spoken_emojis = 23;
364+
347365
// If 'true', enables speaker detection for each recognized word in
348366
// the top alternative of the recognition result using a speaker_tag provided
349367
// in the WordInfo.
@@ -674,8 +692,8 @@ message LongRunningRecognizeMetadata {
674692
// audio, and `single_utterance` is set to false, then no messages are streamed
675693
// back to the client.
676694
//
677-
// Here's an example of a series of ten `StreamingRecognizeResponse`s that might
678-
// be returned while processing audio:
695+
// Here's an example of a series of `StreamingRecognizeResponse`s that might be
696+
// returned while processing audio:
679697
//
680698
// 1. results { alternatives { transcript: "tube" } stability: 0.01 }
681699
//

0 commit comments

Comments
 (0)