Class: Telnyx::Resources::SpeechToText
- Inherits:
-
Object
- Object
- Telnyx::Resources::SpeechToText
- Defined in:
- lib/telnyx/resources/speech_to_text.rb
Overview
Discover available speech-to-text providers, models, and supported languages.
Instance Method Summary collapse
-
#initialize(client:) ⇒ SpeechToText
constructor
private
A new instance of SpeechToText.
-
#list_providers(provider: nil, service_type: nil, request_options: {}) ⇒ Telnyx::Models::SpeechToTextListProvidersResponse
Some parameter documentations has been truncated, see Models::SpeechToTextListProvidersParams for more details.
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.
55 56 57 |
# File 'lib/telnyx/resources/speech_to_text.rb', line 55 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_based` — file-based transcription via `/ai/audio/transcriptions`.
-
‘in_call` — live call transcription via Call Control `transcription_start`.
-
‘ai_assistant` — STT configured on a Call Control AI Assistant via voice-assistant `TranscriptionConfig` (covers both live-streaming and non-streaming/batch models).
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.
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/telnyx/resources/speech_to_text.rb', line 38 def list_providers(params = {}) parsed, = 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: ) end |