---
title: "Send to speech recognition"
method: POST
path: "/{sub_domain}/api/speech-recognition"
tags: ["Speech-Recognition"]
---

# Send to speech recognition

`POST /{sub_domain}/api/speech-recognition`

## Request

- Base URL: `https://api.commpeak.com/pbx`
- URL: `https://api.commpeak.com/pbx/{sub_domain}/api/speech-recognition`
- Auth: API key in header `Authorization`

Send existing call recordings to speech recognition for transcription.

**When to use.** Transcribe calls that were recorded earlier but not yet processed. To retrieve a finished transcription for a single call, use `GET /speech-recognition/{call_id}`. To search transcribed calls and have results delivered to your own endpoint, use `GET /speech-recognition` with a callback URL.

**Request body.** Provide `call_ids` (an array of call IDs) to select the calls, plus:

- `token` (string, required): your speech recognition token. To obtain a token, contact your account manager.
- `languages` (array, required): up to three language codes to transcribe.
- `recording_side` (string, required): which channel to transcribe. One of `caller`, `callee`, `both`.
- `min_duration` (integer): minimum recording length in seconds. Default 1.
- `from`, `till` (date-time): restrict to calls created within this range.

**Returns.** A `results` object with a `calls` map keyed by call ID. Each entry reports whether the call was accepted for transcription, or the reason it was skipped (for example the recording is still being prepared, or the call was already sent).

**Note.** Only the token used to submit a call can later retrieve that call's transcription.

## Path parameters

- `sub_domain` string, required: PBX Name (subdomain)

## Request body

- SpeechRecognitionInput
  - `call_ids` integer[], required: Array of call IDs to send for transcription.
  - `token` string, required: Speech recognition token. To obtain a token, contact your account manager.
  - `languages` string[], required: Speech recognition languages, up to 3.
  - `recording_side` string, required: Recording channels to transcribe. One of caller, callee, both.
  - `min_duration` integer, nullable: Minimum recording duration in seconds. Default 1.
  - `from` string, nullable: Minimum call creation date.
  - `till` string, nullable: Maximum call creation date.

## Response `201`

Successful Response

- SpeechRecognitionResponse
  - `results` object, required: Nested result tree. The shape depends on the filter used in the request; each leaf call entry is a SpeechResult object.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/commpeak/apis/commpeak-pbx-api.md) - [All operations](https://skmtc.dev/commpeak/apis/commpeak-pbx-api/llms.txt) - [OpenAPI document](https://skmtc.dev/commpeak/apis/commpeak-pbx-api/revisions/0b1e8c7fd3f6?raw)
