Class: Bandwidth::Bxml::StartTranscription

Inherits:
NestableVerb show all
Defined in:
lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb

Instance Method Summary collapse

Methods inherited from NestableVerb

#generate_xml

Methods inherited from Verb

#generate_xml, #set_attributes, #to_bxml

Constructor Details

#initialize(custom_params = [], attributes = {}) ⇒ StartTranscription

Initializer

Parameters:

  • custom_params (Verb) (defaults to: []) —

    or [Array] XML element children. Defaults to an empty array. Valid nested custom params are: CustomParam. You may specify up to 12 elements nested within a tag.

  • attributes (Hash) (defaults to: {}) —

    The attributes to add to the element. Defaults to an empty hash.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb', line 7

def initialize(custom_params = [], attributes = {})
  super('StartTranscription', nil, custom_params, attributes)
  
  @attribute_map = {
    name: 'name',                                           # Optional [String]: A name to refer to this transcription by. Used when sending <StopTranscription>. If not provided, it will default to the generated transcription id as sent in the Real-Time Transcription Started webhook.
    tracks: 'tracks',                                       # Optional [String]: The part of the call to send a transcription from. inbound, outbound or both. Default is inbound.
    transcription_event_url: 'transcriptionEventUrl',       # Optional [String]: URL to send the associated Webhook events to during this real-time transcription's lifetime. Does not accept BXML. May be a relative URL.
    transcription_event_method: 'transcriptionEventMethod', # Optional [String]: The HTTP method to use for the request to transcriptionEventUrl. GET or POST. Default value is POST.
    username: 'username',                                   # Optional [String]: The username to send in the HTTP request to transcriptionEventUrl. If specified, the transcriptionEventUrl must be TLS-encrypted (i.e., https).
    password: 'password',                                   # Optional [String]: The password to send in the HTTP request to transcriptionEventUrl. If specified, the transcriptionEventUrl must be TLS-encrypted (i.e., https).
    destination: 'destination',                             # Optional [String]: A websocket URI to send the transcription to. A transcription of the specified tracks will be sent via websocket to this URL as a series of JSON messages. See below for more details on the websocket packet format.
    stabilized: 'stabilized',                               # Optional [Boolean]: Whether to send transcription update events to the specified destination only after they have become stable. Requires destination. Defaults to true.
    detect_language: 'detectLanguage',                      # Optional [Boolean]: A boolean value to indicate that the recording may not be in English, and the transcription service will need to detect the dominant language the recording is in and transcribe accordingly. See the BXML documentation for the list of supported locales. Default is false.
    preferred_languages: 'preferredLanguages',              # Optional [String]: A comma-separated list of language locales in which the transcription should be performed. Requires detect_language to be false. See the BXML documentation for the list of supported locales. Defaults to en-US.
  }
end

Instance Method Details

#add_custom_params(custom_params) ⇒ Object

Add custom param or params to the nested verbs array

Parameters:

  • custom_params (CustomParam) —

    or [Array] Verb or verbs to add to the array.



26
27
28
# File 'lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb', line 26

def add_custom_params(custom_params)
  @nested_verbs.push(*custom_params)
end