Class: Telnyx::Resources::SpeechToText
- Inherits:
-
Object
- Object
- Telnyx::Resources::SpeechToText
- Defined in:
- lib/telnyx/resources/speech_to_text.rb
Overview
Speech to text command operations
Instance Method Summary collapse
-
#initialize(client:) ⇒ SpeechToText
constructor
private
A new instance of SpeechToText.
-
#transcribe(input_format:, transcription_engine:, interim_results: nil, language: nil, model: nil, request_options: {}) ⇒ nil
Transcribe audio streams to text over WebSocket.
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.
41 42 43 |
# File 'lib/telnyx/resources/speech_to_text.rb', line 41 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.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/telnyx/resources/speech_to_text.rb', line 26 def transcribe(params) parsed, = Telnyx::SpeechToTextTranscribeParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "speech-to-text/transcription", query: query, model: NilClass, options: ) end |