Class: Telnyx::Resources::SpeechToText

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

Overview

Discover available speech-to-text providers, models, and supported languages.

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:



54
55
56
# File 'lib/telnyx/resources/speech_to_text.rb', line 54

def initialize(client:)
  @client = client
end

Instance Method Details

#list_providers(provider: nil, service_type: nil, request_options: {}) ⇒ Telnyx::Models::SpeechToTextListProvidersResponse

Some parameter documentations has been truncated, see Models::SpeechToTextListProvidersParams for more details.

Retrieve the canonical list of supported speech-to-text providers, models, accepted language codes, and the service types each model supports.

Service types:

  • ‘streaming` — standalone WebSocket transcription via `/speech-to-text/transcription`.

  • ‘file_transcription` — file-based transcription via `/ai/audio/transcriptions`.

  • ‘in_call_transcription` — live call transcription via Call Control `transcription_start`.

Use this endpoint to discover which (provider, model) combinations are available for the surface you need, and which language codes each accepts. ‘auto` in a `languages` array indicates the provider performs language detection.

Parameters:

Returns:

See Also:



37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/telnyx/resources/speech_to_text.rb', line 37

def list_providers(params = {})
  parsed, options = Telnyx::SpeechToTextListProvidersParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  path =
    @client.base_url_overridden? ? "speech-to-text/providers" : "https://api.telnyx.com/v2/speech-to-text/providers"
  @client.request(
    method: :get,
    path: path,
    query: query,
    model: Telnyx::Models::SpeechToTextListProvidersResponse,
    options: options
  )
end