Class: Cohere::Transcribe::TranscriptionOptions
- Inherits:
-
Data
- Object
- Data
- Cohere::Transcribe::TranscriptionOptions
- Defined in:
- lib/cohere/transcribe/types.rb,
sig/cohere/transcribe.rbs
Overview
Complete transcription configuration shared with the command-line interface.
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
-
#adapter_revision ⇒ Object
readonly
Returns the value of attribute adapter_revision.
-
#adaptive_batch ⇒ Object
readonly
Returns the value of attribute adaptive_batch.
-
#align_batch_size ⇒ Object
readonly
Returns the value of attribute align_batch_size.
-
#align_dtype ⇒ Object
readonly
Returns the value of attribute align_dtype.
-
#alignment ⇒ Object
readonly
Returns the value of attribute alignment.
-
#audio_backend ⇒ Object
readonly
Returns the value of attribute audio_backend.
-
#audio_memory_gb ⇒ Object
readonly
Returns the value of attribute audio_memory_gb.
-
#batch_audio_seconds ⇒ Object
readonly
Returns the value of attribute batch_audio_seconds.
-
#batch_max_size ⇒ Object
readonly
Returns the value of attribute batch_max_size.
-
#batch_size ⇒ Object
readonly
Returns the value of attribute batch_size.
-
#batch_vram_target ⇒ Object
readonly
Returns the value of attribute batch_vram_target.
-
#device ⇒ Object
readonly
Returns the value of attribute device.
-
#dtype ⇒ Object
readonly
Returns the value of attribute dtype.
-
#energy_threshold ⇒ Object
readonly
Returns the value of attribute energy_threshold.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#max_chars ⇒ Object
readonly
Returns the value of attribute max_chars.
-
#max_cue_dur ⇒ Object
readonly
Returns the value of attribute max_cue_dur.
-
#max_dur ⇒ Object
readonly
Returns the value of attribute max_dur.
-
#max_gap ⇒ Object
readonly
Returns the value of attribute max_gap.
-
#max_new_tokens ⇒ Object
readonly
Returns the value of attribute max_new_tokens.
-
#max_retry_tokens ⇒ Object
readonly
Returns the value of attribute max_retry_tokens.
-
#max_silence ⇒ Object
readonly
Returns the value of attribute max_silence.
-
#min_dur ⇒ Object
readonly
Returns the value of attribute min_dur.
-
#min_silence_ms ⇒ Object
readonly
Returns the value of attribute min_silence_ms.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#model_revision ⇒ Object
readonly
Returns the value of attribute model_revision.
-
#pin_memory ⇒ Object
readonly
Returns the value of attribute pin_memory.
-
#pipeline_preparation ⇒ Object
readonly
Returns the value of attribute pipeline_preparation.
-
#preprocess_workers ⇒ Object
readonly
Returns the value of attribute preprocess_workers.
-
#publication ⇒ Object
readonly
Returns the value of attribute publication.
-
#recursive ⇒ Object
readonly
Returns the value of attribute recursive.
-
#speech_pad_ms ⇒ Object
readonly
Returns the value of attribute speech_pad_ms.
-
#stop_repetition_loops ⇒ Object
readonly
Returns the value of attribute stop_repetition_loops.
-
#text_only ⇒ Object
readonly
Returns the value of attribute text_only.
-
#truncation_policy ⇒ Object
readonly
Returns the value of attribute truncation_policy.
-
#vad ⇒ Object
readonly
Returns the value of attribute vad.
-
#vad_batch_size ⇒ Object
readonly
Returns the value of attribute vad_batch_size.
-
#vad_block_frames ⇒ Object
readonly
Returns the value of attribute vad_block_frames.
-
#vad_engine ⇒ Object
readonly
Returns the value of attribute vad_engine.
-
#vad_merge ⇒ Object
readonly
Returns the value of attribute vad_merge.
-
#vad_threads ⇒ Object
readonly
Returns the value of attribute vad_threads.
-
#vad_threshold ⇒ Object
readonly
Returns the value of attribute vad_threshold.
Class Method Summary collapse
Instance Method Summary collapse
Constructor Details
#initialize(model: TypesSupport::DEFAULT_ASR_MODEL_ID, model_revision: nil, adapter: nil, adapter_revision: nil, language: "ar", text_only: false, recursive: true, device: "auto", dtype: "auto", audio_backend: "auto", audio_memory_gb: 4.0, preprocess_workers: nil, pipeline_preparation: true, vad: "silero", vad_engine: "auto", vad_batch_size: 16, vad_block_frames: 512, vad_threads: nil, vad_merge: false, min_dur: 0.5, max_dur: 30.0, max_silence: 0.6, energy_threshold: 50.0, vad_threshold: 0.5, min_silence_ms: 300, speech_pad_ms: 60, batch_size: nil, batch_max_size: nil, batch_audio_seconds: nil, batch_vram_target: 0.9, adaptive_batch: false, pin_memory: false, max_new_tokens: 445, max_retry_tokens: 896, truncation_policy: "retry", stop_repetition_loops: true, alignment: "segment", align_batch_size: 4, align_dtype: "fp32", max_chars: 80, max_cue_dur: 6.0, max_gap: 0.6, publication: nil) ⇒ TranscriptionOptions
Returns a new instance of TranscriptionOptions.
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/cohere/transcribe/types.rb', line 140 def initialize( model: TypesSupport::DEFAULT_ASR_MODEL_ID, model_revision: nil, adapter: nil, adapter_revision: nil, language: "ar", text_only: false, recursive: true, device: "auto", dtype: "auto", audio_backend: "auto", audio_memory_gb: 4.0, preprocess_workers: nil, pipeline_preparation: true, vad: "silero", vad_engine: "auto", vad_batch_size: 16, vad_block_frames: 512, vad_threads: nil, vad_merge: false, min_dur: 0.5, max_dur: 30.0, max_silence: 0.6, energy_threshold: 50.0, vad_threshold: 0.5, min_silence_ms: 300, speech_pad_ms: 60, batch_size: nil, batch_max_size: nil, batch_audio_seconds: nil, batch_vram_target: 0.9, adaptive_batch: false, pin_memory: false, max_new_tokens: 445, max_retry_tokens: 896, truncation_policy: "retry", stop_repetition_loops: true, alignment: "segment", align_batch_size: 4, align_dtype: "fp32", max_chars: 80, max_cue_dur: 6.0, max_gap: 0.6, publication: nil ) super( model: TypesSupport.immutable(model), model_revision: TypesSupport.immutable(model_revision), adapter: TypesSupport.immutable(adapter), adapter_revision: TypesSupport.immutable(adapter_revision), language: TypesSupport.immutable(language), text_only: text_only, recursive: recursive, device: TypesSupport.immutable(device), dtype: TypesSupport.immutable(dtype), audio_backend: TypesSupport.immutable(audio_backend), audio_memory_gb: audio_memory_gb, preprocess_workers: preprocess_workers, pipeline_preparation: pipeline_preparation, vad: TypesSupport.immutable(vad), vad_engine: TypesSupport.immutable(vad_engine), vad_batch_size: vad_batch_size, vad_block_frames: vad_block_frames, vad_threads: vad_threads, vad_merge: vad_merge, min_dur: min_dur, max_dur: max_dur, max_silence: max_silence, energy_threshold: energy_threshold, vad_threshold: vad_threshold, min_silence_ms: min_silence_ms, speech_pad_ms: speech_pad_ms, batch_size: batch_size, batch_max_size: batch_max_size, batch_audio_seconds: batch_audio_seconds, batch_vram_target: batch_vram_target, adaptive_batch: adaptive_batch, pin_memory: pin_memory, max_new_tokens: max_new_tokens, max_retry_tokens: max_retry_tokens, truncation_policy: TypesSupport.immutable(truncation_policy), stop_repetition_loops: stop_repetition_loops, alignment: TypesSupport.immutable(alignment), align_batch_size: align_batch_size, align_dtype: TypesSupport.immutable(align_dtype), max_chars: max_chars, max_cue_dur: max_cue_dur, max_gap: max_gap, publication: publication ) end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def adapter @adapter end |
#adapter_revision ⇒ Object (readonly)
Returns the value of attribute adapter_revision
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def adapter_revision @adapter_revision end |
#adaptive_batch ⇒ Object (readonly)
Returns the value of attribute adaptive_batch
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def adaptive_batch @adaptive_batch end |
#align_batch_size ⇒ Object (readonly)
Returns the value of attribute align_batch_size
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def align_batch_size @align_batch_size end |
#align_dtype ⇒ Object (readonly)
Returns the value of attribute align_dtype
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def align_dtype @align_dtype end |
#alignment ⇒ Object (readonly)
Returns the value of attribute alignment
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def alignment @alignment end |
#audio_backend ⇒ Object (readonly)
Returns the value of attribute audio_backend
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def audio_backend @audio_backend end |
#audio_memory_gb ⇒ Object (readonly)
Returns the value of attribute audio_memory_gb
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def audio_memory_gb @audio_memory_gb end |
#batch_audio_seconds ⇒ Object (readonly)
Returns the value of attribute batch_audio_seconds
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def batch_audio_seconds @batch_audio_seconds end |
#batch_max_size ⇒ Object (readonly)
Returns the value of attribute batch_max_size
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def batch_max_size @batch_max_size end |
#batch_size ⇒ Object (readonly)
Returns the value of attribute batch_size
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def batch_size @batch_size end |
#batch_vram_target ⇒ Object (readonly)
Returns the value of attribute batch_vram_target
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def batch_vram_target @batch_vram_target end |
#device ⇒ Object (readonly)
Returns the value of attribute device
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def device @device end |
#dtype ⇒ Object (readonly)
Returns the value of attribute dtype
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def dtype @dtype end |
#energy_threshold ⇒ Object (readonly)
Returns the value of attribute energy_threshold
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def energy_threshold @energy_threshold end |
#language ⇒ Object (readonly)
Returns the value of attribute language
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def language @language end |
#max_chars ⇒ Object (readonly)
Returns the value of attribute max_chars
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def max_chars @max_chars end |
#max_cue_dur ⇒ Object (readonly)
Returns the value of attribute max_cue_dur
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def max_cue_dur @max_cue_dur end |
#max_dur ⇒ Object (readonly)
Returns the value of attribute max_dur
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def max_dur @max_dur end |
#max_gap ⇒ Object (readonly)
Returns the value of attribute max_gap
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def max_gap @max_gap end |
#max_new_tokens ⇒ Object (readonly)
Returns the value of attribute max_new_tokens
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def max_new_tokens @max_new_tokens end |
#max_retry_tokens ⇒ Object (readonly)
Returns the value of attribute max_retry_tokens
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def max_retry_tokens @max_retry_tokens end |
#max_silence ⇒ Object (readonly)
Returns the value of attribute max_silence
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def max_silence @max_silence end |
#min_dur ⇒ Object (readonly)
Returns the value of attribute min_dur
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def min_dur @min_dur end |
#min_silence_ms ⇒ Object (readonly)
Returns the value of attribute min_silence_ms
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def min_silence_ms @min_silence_ms end |
#model ⇒ Object (readonly)
Returns the value of attribute model
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def model @model end |
#model_revision ⇒ Object (readonly)
Returns the value of attribute model_revision
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def model_revision @model_revision end |
#pin_memory ⇒ Object (readonly)
Returns the value of attribute pin_memory
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def pin_memory @pin_memory end |
#pipeline_preparation ⇒ Object (readonly)
Returns the value of attribute pipeline_preparation
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def pipeline_preparation @pipeline_preparation end |
#preprocess_workers ⇒ Object (readonly)
Returns the value of attribute preprocess_workers
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def preprocess_workers @preprocess_workers end |
#publication ⇒ Object (readonly)
Returns the value of attribute publication
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def publication @publication end |
#recursive ⇒ Object (readonly)
Returns the value of attribute recursive
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def recursive @recursive end |
#speech_pad_ms ⇒ Object (readonly)
Returns the value of attribute speech_pad_ms
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def speech_pad_ms @speech_pad_ms end |
#stop_repetition_loops ⇒ Object (readonly)
Returns the value of attribute stop_repetition_loops
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def stop_repetition_loops @stop_repetition_loops end |
#text_only ⇒ Object (readonly)
Returns the value of attribute text_only
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def text_only @text_only end |
#truncation_policy ⇒ Object (readonly)
Returns the value of attribute truncation_policy
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def truncation_policy @truncation_policy end |
#vad ⇒ Object (readonly)
Returns the value of attribute vad
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def vad @vad end |
#vad_batch_size ⇒ Object (readonly)
Returns the value of attribute vad_batch_size
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def vad_batch_size @vad_batch_size end |
#vad_block_frames ⇒ Object (readonly)
Returns the value of attribute vad_block_frames
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def vad_block_frames @vad_block_frames end |
#vad_engine ⇒ Object (readonly)
Returns the value of attribute vad_engine
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def vad_engine @vad_engine end |
#vad_merge ⇒ Object (readonly)
Returns the value of attribute vad_merge
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def vad_merge @vad_merge end |
#vad_threads ⇒ Object (readonly)
Returns the value of attribute vad_threads
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def vad_threads @vad_threads end |
#vad_threshold ⇒ Object (readonly)
Returns the value of attribute vad_threshold
95 96 97 |
# File 'lib/cohere/transcribe/types.rb', line 95 def vad_threshold @vad_threshold end |
Class Method Details
.new ⇒ Object
75 |
# File 'sig/cohere/transcribe.rbs', line 75
def self.new: (?model: path_input, ?model_revision: String?, ?adapter: path_input?,
|