Class: Telnyx::Resources::AI::Audio
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Audio
- Defined in:
- lib/telnyx/resources/ai/audio.rb,
sig/telnyx/resources/ai/audio.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ Audio
constructor
private
A new instance of Audio.
-
#transcribe(model:, file: nil, file_url: nil, language: nil, model_config: nil, response_format: nil, timestamp_granularities: nil, request_options: {}) ⇒ Telnyx::Models::AI::AudioTranscribeResponse
Some parameter documentations has been truncated, see Models::AI::AudioTranscribeParams for more details.
Constructor Details
#initialize(client:) ⇒ Audio
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Audio.
50 51 52 |
# File 'lib/telnyx/resources/ai/audio.rb', line 50 def initialize(client:) @client = client end |
Instance Method Details
#transcribe(model:, file: nil, file_url: nil, language: nil, model_config: nil, response_format: nil, timestamp_granularities: nil, request_options: {}) ⇒ Telnyx::Models::AI::AudioTranscribeResponse
Some parameter documentations has been truncated, see Models::AI::AudioTranscribeParams for more details.
Transcribe speech to text. This endpoint is consistent with the OpenAI Transcription API and may be used with the OpenAI JS or Python SDK.
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/telnyx/resources/ai/audio.rb', line 35 def transcribe(params) parsed, = Telnyx::AI::AudioTranscribeParams.dump_request(params) @client.request( method: :post, path: "ai/audio/transcriptions", headers: {"content-type" => "multipart/form-data"}, body: parsed, model: Telnyx::Models::AI::AudioTranscribeResponse, options: ) end |