If 'true', enables speaker detection for each recognized word in
the top alternative of the recognition result using a speaker_label
provided in the WordInfo.
Maximum number of speakers in the conversation. This range gives you more
flexibility by allowing the system to automatically determine the correct
number of speakers. If not set, the default value is 6.
Minimum number of speakers in the conversation. This range gives you more
flexibility by allowing the system to automatically determine the correct
number of speakers. If not set, the default value is 2.
Deprecated.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.speaker_tag is deprecated.
See google/cloud/speech/v1p1beta1/cloud_speech.proto;l=507
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-16 UTC."],[],[],null,["# Interface SpeakerDiarizationConfigOrBuilder (4.67.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.67.0 (latest)](/java/docs/reference/google-cloud-speech/latest/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.65.0](/java/docs/reference/google-cloud-speech/4.65.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.63.0](/java/docs/reference/google-cloud-speech/4.63.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.62.0](/java/docs/reference/google-cloud-speech/4.62.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.59.0](/java/docs/reference/google-cloud-speech/4.59.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.58.0](/java/docs/reference/google-cloud-speech/4.58.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.57.0](/java/docs/reference/google-cloud-speech/4.57.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.55.0](/java/docs/reference/google-cloud-speech/4.55.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.54.0](/java/docs/reference/google-cloud-speech/4.54.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.53.0](/java/docs/reference/google-cloud-speech/4.53.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.52.0](/java/docs/reference/google-cloud-speech/4.52.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.51.0](/java/docs/reference/google-cloud-speech/4.51.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.50.0](/java/docs/reference/google-cloud-speech/4.50.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.49.0](/java/docs/reference/google-cloud-speech/4.49.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.48.0](/java/docs/reference/google-cloud-speech/4.48.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.47.0](/java/docs/reference/google-cloud-speech/4.47.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.46.0](/java/docs/reference/google-cloud-speech/4.46.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.44.0](/java/docs/reference/google-cloud-speech/4.44.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.43.0](/java/docs/reference/google-cloud-speech/4.43.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.42.0](/java/docs/reference/google-cloud-speech/4.42.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.41.0](/java/docs/reference/google-cloud-speech/4.41.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.40.0](/java/docs/reference/google-cloud-speech/4.40.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.39.0](/java/docs/reference/google-cloud-speech/4.39.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.38.0](/java/docs/reference/google-cloud-speech/4.38.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.37.0](/java/docs/reference/google-cloud-speech/4.37.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.36.0](/java/docs/reference/google-cloud-speech/4.36.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.35.0](/java/docs/reference/google-cloud-speech/4.35.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.34.0](/java/docs/reference/google-cloud-speech/4.34.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.32.0](/java/docs/reference/google-cloud-speech/4.32.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.31.0](/java/docs/reference/google-cloud-speech/4.31.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.30.0](/java/docs/reference/google-cloud-speech/4.30.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.29.0](/java/docs/reference/google-cloud-speech/4.29.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.28.0](/java/docs/reference/google-cloud-speech/4.28.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.27.0](/java/docs/reference/google-cloud-speech/4.27.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.26.0](/java/docs/reference/google-cloud-speech/4.26.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.25.0](/java/docs/reference/google-cloud-speech/4.25.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.24.0](/java/docs/reference/google-cloud-speech/4.24.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.23.0](/java/docs/reference/google-cloud-speech/4.23.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.22.0](/java/docs/reference/google-cloud-speech/4.22.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.19.0](/java/docs/reference/google-cloud-speech/4.19.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.18.0](/java/docs/reference/google-cloud-speech/4.18.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.17.0](/java/docs/reference/google-cloud-speech/4.17.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.16.0](/java/docs/reference/google-cloud-speech/4.16.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.15.0](/java/docs/reference/google-cloud-speech/4.15.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.14.0](/java/docs/reference/google-cloud-speech/4.14.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.13.0](/java/docs/reference/google-cloud-speech/4.13.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.12.0](/java/docs/reference/google-cloud-speech/4.12.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.11.0](/java/docs/reference/google-cloud-speech/4.11.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.10.0](/java/docs/reference/google-cloud-speech/4.10.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.9.0](/java/docs/reference/google-cloud-speech/4.9.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.8.0](/java/docs/reference/google-cloud-speech/4.8.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.7.0](/java/docs/reference/google-cloud-speech/4.7.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.6.0](/java/docs/reference/google-cloud-speech/4.6.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.4.0](/java/docs/reference/google-cloud-speech/4.4.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.3.0](/java/docs/reference/google-cloud-speech/4.3.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.2.0](/java/docs/reference/google-cloud-speech/4.2.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.1.0](/java/docs/reference/google-cloud-speech/4.1.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [4.0.0](/java/docs/reference/google-cloud-speech/4.0.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [3.0.0](/java/docs/reference/google-cloud-speech/3.0.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [2.6.1](/java/docs/reference/google-cloud-speech/2.6.1/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [2.5.9](/java/docs/reference/google-cloud-speech/2.5.9/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [2.4.0](/java/docs/reference/google-cloud-speech/2.4.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [2.3.0](/java/docs/reference/google-cloud-speech/2.3.0/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder)\n- [2.2.15](/java/docs/reference/google-cloud-speech/2.2.15/com.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfigOrBuilder) \n\n public interface SpeakerDiarizationConfigOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getEnableSpeakerDiarization()\n\n public abstract boolean getEnableSpeakerDiarization()\n\nIf 'true', enables speaker detection for each recognized word in\nthe top alternative of the recognition result using a speaker_label\nprovided in the WordInfo.\n\n`bool enable_speaker_diarization = 1;`\n\n### getMaxSpeakerCount()\n\n public abstract int getMaxSpeakerCount()\n\nMaximum number of speakers in the conversation. This range gives you more\nflexibility by allowing the system to automatically determine the correct\nnumber of speakers. If not set, the default value is 6.\n\n`int32 max_speaker_count = 3;`\n\n### getMinSpeakerCount()\n\n public abstract int getMinSpeakerCount()\n\nMinimum number of speakers in the conversation. This range gives you more\nflexibility by allowing the system to automatically determine the correct\nnumber of speakers. If not set, the default value is 2.\n\n`int32 min_speaker_count = 2;`\n\n### getSpeakerTag() (deprecated)\n\n public abstract int getSpeakerTag()\n\n**Deprecated.** *google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.speaker_tag is deprecated.\nSee google/cloud/speech/v1p1beta1/cloud_speech.proto;l=507*\n\nOutput only. Unused.\n\n`int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];\n`"]]