Skip to content

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 authored Oct 4, 2021
1 parent 3a90bd2 commit 5549543
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
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 5549543

Please sign in to comment.