Class: Google::Apis::SpeechV1p1beta1::SpeakerDiarizationConfig
- Inherits:
-
Object
- Object
- Google::Apis::SpeechV1p1beta1::SpeakerDiarizationConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/speech_v1p1beta1/classes.rb,
lib/google/apis/speech_v1p1beta1/representations.rb,
lib/google/apis/speech_v1p1beta1/representations.rb
Overview
Config to enable speaker diarization.
Instance Attribute Summary collapse
-
#enable_speaker_diarization ⇒ Boolean
(also: #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.
-
#max_speaker_count ⇒ Fixnum
Maximum number of speakers in the conversation.
-
#min_speaker_count ⇒ Fixnum
Minimum number of speakers in the conversation.
-
#speaker_tag ⇒ Fixnum
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SpeakerDiarizationConfig
constructor
A new instance of SpeakerDiarizationConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SpeakerDiarizationConfig
Returns a new instance of SpeakerDiarizationConfig.
1196 1197 1198 |
# File 'lib/google/apis/speech_v1p1beta1/classes.rb', line 1196 def initialize(**args) update!(**args) end |
Instance Attribute Details
#enable_speaker_diarization ⇒ Boolean 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
1174 1175 1176 |
# File 'lib/google/apis/speech_v1p1beta1/classes.rb', line 1174 def enable_speaker_diarization @enable_speaker_diarization end |
#max_speaker_count ⇒ Fixnum
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
1182 1183 1184 |
# File 'lib/google/apis/speech_v1p1beta1/classes.rb', line 1182 def max_speaker_count @max_speaker_count end |
#min_speaker_count ⇒ Fixnum
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
1189 1190 1191 |
# File 'lib/google/apis/speech_v1p1beta1/classes.rb', line 1189 def min_speaker_count @min_speaker_count end |
#speaker_tag ⇒ Fixnum
Output only. Unused.
Corresponds to the JSON property speakerTag
1194 1195 1196 |
# File 'lib/google/apis/speech_v1p1beta1/classes.rb', line 1194 def speaker_tag @speaker_tag end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1201 1202 1203 1204 1205 1206 |
# File 'lib/google/apis/speech_v1p1beta1/classes.rb', line 1201 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 |