Class: Telnyx::Models::AI::AudioTranscribeParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Telnyx::Models::AI::AudioTranscribeParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/telnyx/models/ai/audio_transcribe_params.rb
Overview
Defined Under Namespace
Modules: Model, ResponseFormat, TimestampGranularities
Instance Attribute Summary collapse
-
#file ⇒ Pathname, ...
The audio file object to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
-
#file_url ⇒ String?
Link to audio file in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
-
#language ⇒ String?
The language of the audio to be transcribed.
-
#model ⇒ Symbol, Telnyx::Models::AI::AudioTranscribeParams::Model
ID of the model to use.
-
#model_config ⇒ Hash{Symbol=>Object}?
Additional model-specific configuration parameters.
-
#response_format ⇒ Symbol, ...
The format of the transcript output.
-
#timestamp_granularities ⇒ Symbol, ...
The timestamp granularities to populate for this transcription.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(model:, file: nil, file_url: nil, language: nil, model_config: nil, response_format: nil, timestamp_granularities: nil, request_options: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see AudioTranscribeParams for more details.
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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(model:, file: nil, file_url: nil, language: nil, model_config: nil, response_format: nil, timestamp_granularities: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see Telnyx::Models::AI::AudioTranscribeParams for more details.
|
|
# File 'lib/telnyx/models/ai/audio_transcribe_params.rb', line 73
|
Instance Attribute Details
#file ⇒ Pathname, ...
The audio file object to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. File uploads are limited to 100 MB. Cannot be used together with ‘file_url`. Note: `deepgram/nova-3` only supports mp3 and wav formats.
27 |
# File 'lib/telnyx/models/ai/audio_transcribe_params.rb', line 27 optional :file, Telnyx::Internal::Type::FileInput |
#file_url ⇒ String?
Link to audio file in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. Support for hosted files is limited to 100MB. Cannot be used together with ‘file`. Note: `deepgram/nova-3` only supports mp3 and wav formats.
35 |
# File 'lib/telnyx/models/ai/audio_transcribe_params.rb', line 35 optional :file_url, String |
#language ⇒ String?
The language of the audio to be transcribed. For ‘deepgram/nova-3`, only English variants are supported: `en`, `en-US`, `en-GB`, `en-AU`, `en-NZ`, `en-IN`. For `openai/whisper-large-v3-turbo`, supports multiple languages. `distil-whisper/distil-large-v2` does not support language parameter.
44 |
# File 'lib/telnyx/models/ai/audio_transcribe_params.rb', line 44 optional :language, String |
#model ⇒ Symbol, Telnyx::Models::AI::AudioTranscribeParams::Model
ID of the model to use. ‘distil-whisper/distil-large-v2` is lower latency but English-only. `openai/whisper-large-v3-turbo` is multi-lingual but slightly higher latency. `deepgram/nova-3` supports English variants (en, en-US, en-GB, en-AU, en-NZ, en-IN) and only accepts mp3/wav files.
18 |
# File 'lib/telnyx/models/ai/audio_transcribe_params.rb', line 18 required :model, enum: -> { Telnyx::AI::AudioTranscribeParams::Model } |
#model_config ⇒ Hash{Symbol=>Object}?
Additional model-specific configuration parameters. Only allowed with ‘deepgram/nova-3` model. Can include Deepgram-specific options such as `smart_format`, `punctuate`, `diarize`, `utterance`, `numerals`, and `language`. If `language` is provided both as a top-level parameter and in `model_config`, the top-level parameter takes precedence.
54 |
# File 'lib/telnyx/models/ai/audio_transcribe_params.rb', line 54 optional :model_config, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown] |
#response_format ⇒ Symbol, ...
The format of the transcript output. Use ‘verbose_json` to take advantage of timestamps.
61 |
# File 'lib/telnyx/models/ai/audio_transcribe_params.rb', line 61 optional :response_format, enum: -> { Telnyx::AI::AudioTranscribeParams::ResponseFormat } |
#timestamp_granularities ⇒ Symbol, ...
The timestamp granularities to populate for this transcription. ‘response_format` must be set verbose_json to use timestamp granularities. Currently `segment` is supported.
69 70 71 |
# File 'lib/telnyx/models/ai/audio_transcribe_params.rb', line 69 optional :timestamp_granularities, enum: -> { Telnyx::AI::AudioTranscribeParams::TimestampGranularities }, api_name: :"timestamp_granularities[]" |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/telnyx/models/ai/audio_transcribe_params.rb', line 104
|