Class: Telnyx::Resources::SpeechToText

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/speech_to_text.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ SpeechToText

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 SpeechToText.

Parameters:



39
40
41
# File 'lib/telnyx/resources/speech_to_text.rb', line 39

def initialize(client:)
  @client = client
end

Instance Method Details

#transcribe(input_format:, transcription_engine:, interim_results: nil, language: nil, model: nil, request_options: {}) ⇒ nil

Transcribe audio streams to text over WebSocket.

Parameters:

Returns:

  • (nil)

See Also:



25
26
27
28
29
30
31
32
33
34
# File 'lib/telnyx/resources/speech_to_text.rb', line 25

def transcribe(params)
  parsed, options = Telnyx::SpeechToTextTranscribeParams.dump_request(params)
  @client.request(
    method: :get,
    path: "speech-to-text/transcription",
    query: parsed,
    model: NilClass,
    options: options
  )
end