Class: Rev::TranscriptionOptions

Inherits:
InputOptions show all
Defined in:
lib/rev-api/models/order_request.rb

Overview

Transcription options. This section contains the input media that must be transferred to our servers using a POST to /inputs, and are referenced using the URIs returned by that call. We also support external links.

Constant Summary collapse

OUTPUT_FILE_FORMATS =

All supported output file formats

{
  :ms_word => 'MS Word',
  :json => 'JSON',
  :text => 'Text',
  :pdf => 'Pdf'
}

Instance Attribute Summary collapse

Attributes inherited from InputOptions

#inputs

Instance Method Summary collapse

Methods inherited from ApiSerializable

#to_hash, #to_json

Constructor Details

#initialize(inputs, info = {}) ⇒ TranscriptionOptions

Returns a new instance of TranscriptionOptions.

Parameters:

  • inputs (Array)

    list of inputs

  • info (Hash) (defaults to: {})

    of fields to initialize instance. May contain:

    • :output_file_formats => String[]

    • :verbatim => true/false

    • :timestamps => true/false

Raises:

  • (ArgumentError)


128
129
130
131
132
# File 'lib/rev-api/models/order_request.rb', line 128

def initialize(inputs, info = {})
  super inputs, info
  raise(ArgumentError, "invalid format(s)") unless validate_output_formats(info[:output_file_formats])
  options_validation(inputs)
end

Instance Attribute Details

#output_file_formatsObject (readonly)

Optional, array of file formats the captions should be delivered as. default is MS Word



106
107
108
# File 'lib/rev-api/models/order_request.rb', line 106

def output_file_formats
  @output_file_formats
end

#timestampsObject (readonly)

Optional, should we include timestamps?



113
114
115
# File 'lib/rev-api/models/order_request.rb', line 113

def timestamps
  @timestamps
end

#verbatimObject (readonly)

Optional, should we transcribe the provided files verbatim? If true, all filler words (i.e. umm, huh) will be included.



110
111
112
# File 'lib/rev-api/models/order_request.rb', line 110

def verbatim
  @verbatim
end