Class: Google::Apis::SpeechV1::SpeakerDiarizationConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/speech_v1/classes.rb,
lib/google/apis/speech_v1/representations.rb,
lib/google/apis/speech_v1/representations.rb

Overview

Config to enable speaker diarization.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SpeakerDiarizationConfig

Returns a new instance of SpeakerDiarizationConfig.



1157
1158
1159
# File 'lib/google/apis/speech_v1/classes.rb', line 1157

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#enable_speaker_diarizationBoolean Also known as: enable_speaker_diarization?

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. Corresponds to the JSON property enableSpeakerDiarization

Returns:

  • (Boolean)


1135
1136
1137
# File 'lib/google/apis/speech_v1/classes.rb', line 1135

def enable_speaker_diarization
  @enable_speaker_diarization
end

#max_speaker_countFixnum

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. Corresponds to the JSON property maxSpeakerCount

Returns:

  • (Fixnum)


1143
1144
1145
# File 'lib/google/apis/speech_v1/classes.rb', line 1143

def max_speaker_count
  @max_speaker_count
end

#min_speaker_countFixnum

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. Corresponds to the JSON property minSpeakerCount

Returns:

  • (Fixnum)


1150
1151
1152
# File 'lib/google/apis/speech_v1/classes.rb', line 1150

def min_speaker_count
  @min_speaker_count
end

#speaker_tagFixnum

Output only. Unused. Corresponds to the JSON property speakerTag

Returns:

  • (Fixnum)


1155
1156
1157
# File 'lib/google/apis/speech_v1/classes.rb', line 1155

def speaker_tag
  @speaker_tag
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1162
1163
1164
1165
1166
1167
# File 'lib/google/apis/speech_v1/classes.rb', line 1162

def update!(**args)
  @enable_speaker_diarization = args[:enable_speaker_diarization] if args.key?(:enable_speaker_diarization)
  @max_speaker_count = args[:max_speaker_count] if args.key?(:max_speaker_count)
  @min_speaker_count = args[:min_speaker_count] if args.key?(:min_speaker_count)
  @speaker_tag = args[:speaker_tag] if args.key?(:speaker_tag)
end