Skip to content

Commit cba230f

Browse files
feat: add custom prompt config in the request and return prompt in the response (#32325)
feat: update min_speaker_count and max_speaker_count to be optional docs: Clarify that min_speaker_count and max_speaker_count in SpeakerDiarizationConfig are not currently used docs: Update guidance on how to enable speaker diarization; to enable, set the diarization_config field to an empty SpeakerDiarizationConfig message PiperOrigin-RevId: 852383212 Source-Link: googleapis/googleapis@1a14153 Source-Link: googleapis/googleapis-gen@c84243c Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlcnZpY2VfdXNhZ2UtdjEvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlcnZpY2VfdXNhZ2UvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNoZWxsLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJjODQyNDNjYWExMWM3ZmM4OTA1NmUwYmQwN2I0YzRjNmFlYTA1MTBiIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNoZWxsLy5Pd2xCb3QueWFtbCIsImgiOiJjODQyNDNjYWExMWM3ZmM4OTA1NmUwYmQwN2I0YzRjNmFlYTA1MTBiIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNwYW5uZXItYWRtaW4tZGF0YWJhc2UtdjEvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNwYW5uZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ==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8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXN0b3JhZ2VfaW5zaWdodHMtdjEvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXN0b3JhZ2VfaW5zaWdodHMvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXN0b3JhZ2VfdHJhbnNmZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXN0b3JhZ2VfdHJhbnNmZXIvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXN1cHBvcnQtdjIvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXN1cHBvcnQtdjJiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJjODQyNDNjYWExMWM3ZmM4OTA1NmUwYmQwN2I0YzRjNmFlYTA1MTBiIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent d1f9e55 commit cba230f

File tree

4 files changed

+45
-21
lines changed

4 files changed

+45
-21
lines changed

google-cloud-speech-v2/lib/google/cloud/speech/v2/cloud_speech_pb.rb

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

google-cloud-speech-v2/proto_docs/google/cloud/speech/v2/cloud_speech.rb

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -496,23 +496,27 @@ module AudioEncoding
496496
# Configuration to enable speaker diarization.
497497
# @!attribute [rw] min_speaker_count
498498
# @return [::Integer]
499-
# Required. Minimum number of speakers in the conversation. This range gives
500-
# you more flexibility by allowing the system to automatically determine the
501-
# correct number of speakers.
502-
#
503-
# To fix the number of speakers detected in the audio, set
504-
# `min_speaker_count` = `max_speaker_count`.
499+
# Optional. The system automatically determines the number of speakers. This
500+
# value is not currently used.
505501
# @!attribute [rw] max_speaker_count
506502
# @return [::Integer]
507-
# Required. Maximum number of speakers in the conversation. Valid values are:
508-
# 1-6. Must be >= `min_speaker_count`. This range gives you more flexibility
509-
# by allowing the system to automatically determine the correct number of
510-
# speakers.
503+
# Optional. The system automatically determines the number of speakers. This
504+
# value is not currently used.
511505
class SpeakerDiarizationConfig
512506
include ::Google::Protobuf::MessageExts
513507
extend ::Google::Protobuf::MessageExts::ClassMethods
514508
end
515509

510+
# Configuration to enable custom prompt in chirp3.
511+
# @!attribute [rw] custom_prompt
512+
# @return [::String]
513+
# Optional. The custom instructions to override the existing instructions for
514+
# chirp3.
515+
class CustomPromptConfig
516+
include ::Google::Protobuf::MessageExts
517+
extend ::Google::Protobuf::MessageExts::ClassMethods
518+
end
519+
516520
# Available recognition features.
517521
# @!attribute [rw] profanity_filter
518522
# @return [::Boolean]
@@ -553,20 +557,17 @@ class SpeakerDiarizationConfig
553557
# Mode for recognizing multi-channel audio.
554558
# @!attribute [rw] diarization_config
555559
# @return [::Google::Cloud::Speech::V2::SpeakerDiarizationConfig]
556-
# Configuration to enable speaker diarization and set additional
557-
# parameters to make diarization better suited for your application.
558-
# When this is enabled, we send all the words from the beginning of the
559-
# audio for the top alternative in every consecutive STREAMING responses.
560-
# This is done in order to improve our speaker tags as our models learn to
561-
# identify the speakers in the conversation over time.
562-
# For non-streaming requests, the diarization results will be provided only
563-
# in the top alternative of the FINAL SpeechRecognitionResult.
560+
# Configuration to enable speaker diarization. To enable diarization, set
561+
# this field to an empty SpeakerDiarizationConfig message.
564562
# @!attribute [rw] max_alternatives
565563
# @return [::Integer]
566564
# Maximum number of recognition hypotheses to be returned.
567565
# The server may return fewer than `max_alternatives`.
568566
# Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
569567
# one. If omitted, will return a maximum of one.
568+
# @!attribute [rw] custom_prompt_config
569+
# @return [::Google::Cloud::Speech::V2::CustomPromptConfig]
570+
# Optional. Configuration to enable custom prompt for chirp3.
570571
class RecognitionFeatures
571572
include ::Google::Protobuf::MessageExts
572573
extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -806,6 +807,10 @@ class RecognizeRequest
806807
# @!attribute [rw] total_billed_duration
807808
# @return [::Google::Protobuf::Duration]
808809
# When available, billed audio seconds for the corresponding request.
810+
# @!attribute [r] prompt
811+
# @return [::String]
812+
# Optional. Output only. Provides the prompt used for the recognition
813+
# request.
809814
class RecognitionResponseMetadata
810815
include ::Google::Protobuf::MessageExts
811816
extend ::Google::Protobuf::MessageExts::ClassMethods

google-cloud-storage-control/.owlbot-manifest.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,26 @@
2525
"samples/Gemfile",
2626
"samples/Rakefile",
2727
"samples/acceptance/helper.rb",
28+
"samples/acceptance/storage_control_anywhere_cache_test.rb",
2829
"samples/acceptance/storage_control_folders_test.rb",
2930
"samples/acceptance/storage_control_managed_folders_test.rb",
3031
"samples/acceptance/storage_control_quickstart_test.rb",
32+
"samples/storage_control_create_anywhere_cache.rb",
3133
"samples/storage_control_create_folder.rb",
3234
"samples/storage_control_delete_folder.rb",
35+
"samples/storage_control_disable_anywhere_cache.rb",
36+
"samples/storage_control_get_anywhere_cache.rb",
3337
"samples/storage_control_get_folder.rb",
38+
"samples/storage_control_list_anywhere_caches.rb",
3439
"samples/storage_control_list_folders.rb",
3540
"samples/storage_control_managed_folder_create.rb",
3641
"samples/storage_control_managed_folder_delete.rb",
3742
"samples/storage_control_managed_folder_get.rb",
3843
"samples/storage_control_managed_folder_list.rb",
44+
"samples/storage_control_pause_anywhere_cache.rb",
3945
"samples/storage_control_quickstart_sample.rb",
40-
"samples/storage_control_rename_folder.rb"
46+
"samples/storage_control_rename_folder.rb",
47+
"samples/storage_control_resume_anywhere_cache.rb",
48+
"samples/storage_control_update_anywhere_cache.rb"
4149
]
4250
}

google-cloud-storage_batch_operations/.owlbot-manifest.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@
2020
"test/helper.rb"
2121
],
2222
"static": [
23-
".OwlBot.yaml"
23+
".OwlBot.yaml",
24+
"samples/.rubocop.yml",
25+
"samples/Gemfile",
26+
"samples/Rakefile",
27+
"samples/acceptance/batch_job_test.rb",
28+
"samples/acceptance/helper.rb",
29+
"samples/storage_batch_cancel_job.rb",
30+
"samples/storage_batch_create_job.rb",
31+
"samples/storage_batch_delete_job.rb",
32+
"samples/storage_batch_get_job.rb",
33+
"samples/storage_batch_list_jobs.rb"
2434
]
2535
}

0 commit comments

Comments
 (0)