Class: Revox::Models::VoiceListResponse::Voice

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/revox/models/voice_list_response.rb,
sig/revox/models/voice_list_response.rbs

Defined Under Namespace

Modules: Language, ModelCompat, Provider

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, 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(id:, description:, language:, name:, provider:, accent: nil, gender: nil, is_cloned: nil, model_compat: nil) ⇒ Object

Some parameter documentations has been truncated, see Revox::Models::VoiceListResponse::Voice for more details.

Parameters:

  • id (String)

    The ID of the voice.

  • description (String)

    The description of the voice.

  • language (Symbol, Revox::Models::VoiceListResponse::Voice::Language)

    The language of the voice.

  • name (String)

    The name of the voice.

  • provider (Symbol, Revox::Models::VoiceListResponse::Voice::Provider)

    The provider of the voice.

  • accent (String) (defaults to: nil)

    The accent/dialect of the voice (e.g. 'american', 'british', 'australian', 'queb

  • gender (String) (defaults to: nil)

    The gender of the voice (e.g. 'male', 'female', 'neutral').

  • is_cloned (Boolean) (defaults to: nil)

    Whether this is a cloned voice.

  • model_compat (Symbol, Revox::Models::VoiceListResponse::Voice::ModelCompat) (defaults to: nil)

    Cartesia model compatibility. Used to filter the voice list by the selected mode



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/revox/models/voice_list_response.rb', line 15

class Voice < Revox::Internal::Type::BaseModel
  # @!attribute id
  #   The ID of the voice.
  #
  #   @return [String]
  required :id, String

  # @!attribute description
  #   The description of the voice.
  #
  #   @return [String]
  required :description, String

  # @!attribute language
  #   The language of the voice.
  #
  #   @return [Symbol, Revox::Models::VoiceListResponse::Voice::Language]
  required :language, enum: -> { Revox::Models::VoiceListResponse::Voice::Language }

  # @!attribute name
  #   The name of the voice.
  #
  #   @return [String]
  required :name, String

  # @!attribute provider
  #   The provider of the voice.
  #
  #   @return [Symbol, Revox::Models::VoiceListResponse::Voice::Provider]
  required :provider, enum: -> { Revox::Models::VoiceListResponse::Voice::Provider }

  # @!attribute accent
  #   The accent/dialect of the voice (e.g. 'american', 'british', 'australian',
  #   'quebec').
  #
  #   @return [String, nil]
  optional :accent, String

  # @!attribute gender
  #   The gender of the voice (e.g. 'male', 'female', 'neutral').
  #
  #   @return [String, nil]
  optional :gender, String

  # @!attribute is_cloned
  #   Whether this is a cloned voice.
  #
  #   @return [Boolean, nil]
  optional :is_cloned, Revox::Internal::Type::Boolean, api_name: :isCloned

  # @!attribute model_compat
  #   Cartesia model compatibility. Used to filter the voice list by the selected
  #   model. Absent/undefined is treated as 'universal'.
  #
  #   @return [Symbol, Revox::Models::VoiceListResponse::Voice::ModelCompat, nil]
  optional :model_compat,
           enum: -> { Revox::Models::VoiceListResponse::Voice::ModelCompat },
           api_name: :modelCompat

  # @!method initialize(id:, description:, language:, name:, provider:, accent: nil, gender: nil, is_cloned: nil, model_compat: nil)
  #   Some parameter documentations has been truncated, see
  #   {Revox::Models::VoiceListResponse::Voice} for more details.
  #
  #   @param id [String] The ID of the voice.
  #
  #   @param description [String] The description of the voice.
  #
  #   @param language [Symbol, Revox::Models::VoiceListResponse::Voice::Language] The language of the voice.
  #
  #   @param name [String] The name of the voice.
  #
  #   @param provider [Symbol, Revox::Models::VoiceListResponse::Voice::Provider] The provider of the voice.
  #
  #   @param accent [String] The accent/dialect of the voice (e.g. 'american', 'british', 'australian', 'queb
  #
  #   @param gender [String] The gender of the voice (e.g. 'male', 'female', 'neutral').
  #
  #   @param is_cloned [Boolean] Whether this is a cloned voice.
  #
  #   @param model_compat [Symbol, Revox::Models::VoiceListResponse::Voice::ModelCompat] Cartesia model compatibility. Used to filter the voice list by the selected mode

  # The language of the voice.
  #
  # @see Revox::Models::VoiceListResponse::Voice#language
  module Language
    extend Revox::Internal::Type::Enum

    EN = :en
    FR = :fr
    ES = :es
    DE = :de
    IT = :it
    PT = :pt
    RU = :ru
    ZH = :zh

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # The provider of the voice.
  #
  # @see Revox::Models::VoiceListResponse::Voice#provider
  module Provider
    extend Revox::Internal::Type::Enum

    CARTESIA = :cartesia
    ELEVENLABS = :elevenlabs

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # Cartesia model compatibility. Used to filter the voice list by the selected
  # model. Absent/undefined is treated as 'universal'.
  #
  # @see Revox::Models::VoiceListResponse::Voice#model_compat
  module ModelCompat
    extend Revox::Internal::Type::Enum

    UNIVERSAL = :universal
    SONIC_3 = :"sonic-3"
    SONIC_3_5 = :"sonic-3.5"

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#accentString?

The accent/dialect of the voice (e.g. 'american', 'british', 'australian', 'quebec').

Parameters:

  • (String)

Returns:

  • (String, nil)


51
# File 'lib/revox/models/voice_list_response.rb', line 51

optional :accent, String

#descriptionString

The description of the voice.

Parameters:

  • value (String)

Returns:

  • (String)


26
# File 'lib/revox/models/voice_list_response.rb', line 26

required :description, String

#genderString?

The gender of the voice (e.g. 'male', 'female', 'neutral').

Parameters:

  • (String)

Returns:

  • (String, nil)


57
# File 'lib/revox/models/voice_list_response.rb', line 57

optional :gender, String

#idString

The ID of the voice.

Parameters:

  • value (String)

Returns:

  • (String)


20
# File 'lib/revox/models/voice_list_response.rb', line 20

required :id, String

#is_clonedBoolean?

Whether this is a cloned voice.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


63
# File 'lib/revox/models/voice_list_response.rb', line 63

optional :is_cloned, Revox::Internal::Type::Boolean, api_name: :isCloned

#languageSymbol, Revox::Models::VoiceListResponse::Voice::Language

The language of the voice.

Parameters:

  • value (Revox::Models::VoiceListResponse::Voice::language)

Returns:



32
# File 'lib/revox/models/voice_list_response.rb', line 32

required :language, enum: -> { Revox::Models::VoiceListResponse::Voice::Language }

#model_compatSymbol, ...

Cartesia model compatibility. Used to filter the voice list by the selected model. Absent/undefined is treated as 'universal'.



70
71
72
# File 'lib/revox/models/voice_list_response.rb', line 70

optional :model_compat,
enum: -> { Revox::Models::VoiceListResponse::Voice::ModelCompat },
api_name: :modelCompat

#nameString

The name of the voice.

Parameters:

  • value (String)

Returns:

  • (String)


38
# File 'lib/revox/models/voice_list_response.rb', line 38

required :name, String

#providerSymbol, Revox::Models::VoiceListResponse::Voice::Provider

The provider of the voice.

Parameters:

  • value (Revox::Models::VoiceListResponse::Voice::provider)

Returns:



44
# File 'lib/revox/models/voice_list_response.rb', line 44

required :provider, enum: -> { Revox::Models::VoiceListResponse::Voice::Provider }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/revox/models/voice_list_response.rb', line 111

Instance Method Details

#to_hash{

Returns:

  • ({)


71
# File 'sig/revox/models/voice_list_response.rbs', line 71

def to_hash: -> {