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.



369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/cohere/transcribe/types.rb', line 369

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



356
357
358
# File 'lib/cohere/transcribe/types.rb', line 356

def cues
  @cues
end

#durationObject (readonly)

Returns the value of attribute duration

Returns:

  • (Object)

    the current value of duration



356
357
358
# File 'lib/cohere/transcribe/types.rb', line 356

def duration
  @duration
end

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



356
357
358
# File 'lib/cohere/transcribe/types.rb', line 356

def error
  @error
end

#outputsObject (readonly)

Returns the value of attribute outputs

Returns:

  • (Object)

    the current value of outputs



356
357
358
# File 'lib/cohere/transcribe/types.rb', line 356

def outputs
  @outputs
end

#pathObject (readonly)

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



356
357
358
# File 'lib/cohere/transcribe/types.rb', line 356

def path
  @path
end

#provenanceObject (readonly)

Returns the value of attribute provenance

Returns:

  • (Object)

    the current value of provenance



356
357
358
# File 'lib/cohere/transcribe/types.rb', line 356

def provenance
  @provenance
end

#relative_pathObject (readonly)

Returns the value of attribute relative_path

Returns:

  • (Object)

    the current value of relative_path



356
357
358
# File 'lib/cohere/transcribe/types.rb', line 356

def relative_path
  @relative_path
end

#segmentsObject (readonly)

Returns the value of attribute segments

Returns:

  • (Object)

    the current value of segments



356
357
358
# File 'lib/cohere/transcribe/types.rb', line 356

def segments
  @segments
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



356
357
358
# File 'lib/cohere/transcribe/types.rb', line 356

def status
  @status
end

#textObject (readonly)

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



356
357
358
# File 'lib/cohere/transcribe/types.rb', line 356

def text
  @text
end

#wordsObject (readonly)

Returns the value of attribute words

Returns:

  • (Object)

    the current value of words



356
357
358
# File 'lib/cohere/transcribe/types.rb', line 356

def words
  @words
end

Class Method Details

.newTranscriptionResult

Parameters:

  • (Object)

Returns:



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

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