Skip to content

Commit 2b219e9

Browse files
authored
fix: Remove reference to deprecated message "diarization_speaker_count" in favor of diarization_config (#264)
1 parent 03475ea commit 2b219e9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

speech/snippets/beta_snippets.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,17 @@ def transcribe_file_with_diarization():
158158

159159
audio = speech.RecognitionAudio(content=content)
160160

161+
diarization_config = speech.SpeakerDiarizationConfig(
162+
enable_speaker_diarization=True,
163+
min_speaker_count=2,
164+
max_speaker_count=10,
165+
)
166+
161167
config = speech.RecognitionConfig(
162168
encoding=speech.RecognitionConfig.AudioEncoding.LINEAR16,
163169
sample_rate_hertz=8000,
164170
language_code="en-US",
165-
enable_speaker_diarization=True,
166-
diarization_speaker_count=2,
171+
diarization_config=diarization_config,
167172
)
168173

169174
print("Waiting for operation to complete...")

0 commit comments

Comments
 (0)