Class: OpenAI::Models::Audio::VoiceConsentCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openai/models/audio/voice_consent_create_params.rb,
sig/openai/models/audio/voice_consent_create_params.rbs

Overview

See Also:

  • OpenAI::Resources::Audio::VoiceConsents#create

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(language:, name:, recording:, request_options: {}) ⇒ VoiceConsentCreateParams

Returns a new instance of VoiceConsentCreateParams.

Parameters:

  • language —

    The BCP 47 language tag for the consent phrase (for example, en-US).

  • name —

    The label to use for this consent recording.

  • recording —

    The consent audio recording file. Maximum size is 10 MiB.

    Supported MIME types: audio/mpeg, audio/wav, audio/x-wav, audio/ogg, audio/aac, audio/flac, audio/webm, audio/mp4.

    String, StringIO, and pathless IO inputs are sent with generic upload metadata. Use OpenAI::FilePart when you need to override the filename or content type.

  • language: (String)
  • name: (String)
  • recording: (OpenAI::Internal::file_input)
  • request_options: (OpenAI::request_opts) (defaults to: {})


# File 'lib/openai/models/audio/voice_consent_create_params.rb', line 36

Instance Attribute Details

#language ⇒ String

The BCP 47 language tag for the consent phrase (for example, en-US).

Returns:

  • (String)


15
# File 'lib/openai/models/audio/voice_consent_create_params.rb', line 15

required :language, String

#name ⇒ String

The label to use for this consent recording.

Returns:

  • (String)


21
# File 'lib/openai/models/audio/voice_consent_create_params.rb', line 21

required :name, String

#recording ⇒ OpenAI::Internal::file_input

The consent audio recording file. Maximum size is 10 MiB.

Supported MIME types: audio/mpeg, audio/wav, audio/x-wav, audio/ogg, audio/aac, audio/flac, audio/webm, audio/mp4.

String, StringIO, and pathless IO inputs are sent with generic upload metadata. Use OpenAI::FilePart when you need to override the filename or content type.

Returns:

  • (OpenAI::Internal::file_input)


34
# File 'lib/openai/models/audio/voice_consent_create_params.rb', line 34

required :recording, OpenAI::Internal::Type::FileInput

Instance Method Details

#to_hash ⇒ { language: String, name: String, recording: OpenAI::Internal::file_input, ?request_options: OpenAI::RequestOptions }

Returns:

  • ({ language: String, name: String, recording: OpenAI::Internal::file_input, ?request_options: OpenAI::RequestOptions })


52
53
54
55
56
57
# File 'sig/openai/models/audio/voice_consent_create_params.rbs', line 52

def to_hash: -> {
  language: String,
  name: String,
  recording: OpenAI::Internal::file_input,
  ?request_options: OpenAI::RequestOptions
}