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

Commit

Permalink
fix: Remove reference to deprecated message "diarization_speaker_coun…
Browse files Browse the repository at this point in the history
…t" in favor of diarization_config (#264)
  • Loading branch information
nicain committed Oct 4, 2021
1 parent 9657e96 commit c1f7f35
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions samples/snippets/beta_snippets.py
Expand Up @@ -158,12 +158,17 @@ def transcribe_file_with_diarization():

audio = speech.RecognitionAudio(content=content)

diarization_config = speech.SpeakerDiarizationConfig(
enable_speaker_diarization=True,
min_speaker_count=2,
max_speaker_count=10,
)

config = speech.RecognitionConfig(
encoding=speech.RecognitionConfig.AudioEncoding.LINEAR16,
sample_rate_hertz=8000,
language_code="en-US",
enable_speaker_diarization=True,
diarization_speaker_count=2,
diarization_config=diarization_config,
)

print("Waiting for operation to complete...")
Expand Down

0 comments on commit c1f7f35

Please sign in to comment.