Class: Cohere::Transcribe::TranscriptionResult

Inherits:
Data
  • Object
show all
Defined in:
lib/cohere/transcribe/types.rb,
sig/cohere/transcribe.rbs

Overview

Immutable result for one expanded input audio file.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:, relative_path:, status:, text:, duration:, segments: [], words: [], cues: [], outputs: [], error: nil, provenance: TranscriptionProvenance.new) ⇒ TranscriptionResult

Returns a new instance of TranscriptionResult.



355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
# File 'lib/cohere/transcribe/types.rb', line 355

def initialize(
  path:,
  relative_path:,
  status:,
  text:,
  duration:,
  segments: [],
  words: [],
  cues: [],
  outputs: [],
  error: nil,
  provenance: TranscriptionProvenance.new
)
  super(
    path: TypesSupport.immutable(path),
    relative_path: TypesSupport.immutable(relative_path),
    status: TypesSupport.immutable(status),
    text: TypesSupport.immutable(text),
    duration: duration,
    segments: TypesSupport.tuple(segments, field: "segments"),
    words: TypesSupport.tuple(words, field: "words"),
    cues: TypesSupport.tuple(cues, field: "cues"),
    outputs: TypesSupport.tuple(outputs, field: "outputs"),
    error: TypesSupport.immutable(error),
    provenance: provenance
  )
end

Instance Attribute Details

#cuesObject (readonly)

Returns the value of attribute cues

Returns:

  • (Object)

    the current value of cues



342
343
344
# File 'lib/cohere/transcribe/types.rb', line 342

def cues
  @cues
end

#durationObject (readonly)

Returns the value of attribute duration

Returns:

  • (Object)

    the current value of duration



342
343
344
# File 'lib/cohere/transcribe/types.rb', line 342

def duration
  @duration
end

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



342
343
344
# File 'lib/cohere/transcribe/types.rb', line 342

def error
  @error
end

#outputsObject (readonly)

Returns the value of attribute outputs

Returns:

  • (Object)

    the current value of outputs



342
343
344
# File 'lib/cohere/transcribe/types.rb', line 342

def outputs
  @outputs
end

#pathObject (readonly)

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



342
343
344
# File 'lib/cohere/transcribe/types.rb', line 342

def path
  @path
end

#provenanceObject (readonly)

Returns the value of attribute provenance

Returns:

  • (Object)

    the current value of provenance



342
343
344
# File 'lib/cohere/transcribe/types.rb', line 342

def provenance
  @provenance
end

#relative_pathObject (readonly)

Returns the value of attribute relative_path

Returns:

  • (Object)

    the current value of relative_path



342
343
344
# File 'lib/cohere/transcribe/types.rb', line 342

def relative_path
  @relative_path
end

#segmentsObject (readonly)

Returns the value of attribute segments

Returns:

  • (Object)

    the current value of segments



342
343
344
# File 'lib/cohere/transcribe/types.rb', line 342

def segments
  @segments
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



342
343
344
# File 'lib/cohere/transcribe/types.rb', line 342

def status
  @status
end

#textObject (readonly)

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



342
343
344
# File 'lib/cohere/transcribe/types.rb', line 342

def text
  @text
end

#wordsObject (readonly)

Returns the value of attribute words

Returns:

  • (Object)

    the current value of words



342
343
344
# File 'lib/cohere/transcribe/types.rb', line 342

def words
  @words
end

Class Method Details

.newTranscriptionResult

Parameters:

  • (Object)

Returns:



155
# File 'sig/cohere/transcribe.rbs', line 155

def self.new: (**untyped) -> TranscriptionResult