Skip to main content
GET
/
speech-to-text
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

await client.speechToText.transcribe({ input_format: 'mp3', transcription_engine: 'Azure' });
{
  "errors": [
    {
      "code": "10004",
      "title": "Missing required parameter",
      "detail": "The 'transcription_engine' parameter is required and cannot be blank.",
      "source": {
        "pointer": "/transcription_engine"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

transcription_engine
enum<string>
required

The transcription engine to use for processing the audio stream.

Available options:
Azure,
Deepgram,
Google,
Telnyx
input_format
enum<string>
required

The format of input audio stream.

Available options:
mp3,
wav
language
string

The language spoken in the audio stream.

interim_results
boolean

Whether to receive interim transcription results.

model

The specific model to use within the selected transcription engine.

Available options:
fast

Response

The request processed successfully.