Skip to main content

Transcribe a File

Transcription:BatchDeployments:All

The quickest way to try transcribing for free is by creating a Speechmatics account and using our Batch Demo in your browser.

This page will show you how to use the Speechmatics REST API to transcribe an audio or video file saved on your local machine. If you want to transcribe a file that is hosted on the Web, you can use our Fetch URL feature.

Finally, you can also learn about On-Prem deployments by following our guides.

Set Up

  1. Create an account on the Speechmatics Portal here.
  2. Navigate to Manage > API Keys page in the Speechmatics On-Demand Portal.
  3. Enter a name for your API key and store your API key somewhere safe.
info

Enterprise customers should speak to Support to get your API keys.

Batch Transcription Examples

The examples below will help you get started by using the official Speechmatics CLI, Python and JavaScript libraries. You can of course integrate using the programming language of your choice by referring to the Jobs API Reference.

The Speechmatics Python library and CLI can found on GitHub and installed using pip:

pip3 install speechmatics-python
speechmatics config set --auth-token $API_KEY
speechmatics batch transcribe example.wav

Transcript Outputs

As well as the content itself, the transcript will include information about the job and metadata such as the transcription config that was used.

Please refer to our API Reference for full details about the transcript contents.

{
  "format": "2.8",
  "job": {
    "created_at": "2019-01-17T17:50:54.113Z",
    "data_name": "example.wav",
    "duration": 275,
    "id": "yjbmf9kqub"
  },
  "metadata": {
    "created_at": "2019-01-17T17:52:26.222Z",
    "language_pack_info": {
      "adapted": false,
      "itn": true,
      "language_description": "English",
      "word_delimiter": " ",
      "writing_direction": "left-to-right"
    },
    "transcription_config": {
      "diarization": "none",
      "language": "en"
    },
    "type": "transcription"
  },
  "results": [
    {
      "alternatives": [
        {
          "confidence": 0.9,
          "content": "Just",
          "language": "en",
          "speaker": "UU"
        }
      ],
      "end_time": 1.07,
      "start_time": 0.9,
      "type": "word"
    },
    {
      "alternatives": [
        {
          "confidence": 1,
          "content": "this",
          "language": "en",
          "speaker": "UU"
        }
      ],
      "end_time": 1.44,
      "start_time": 1.11,
      "type": "word"
    },
    {
      "alternatives": [
        {
          "confidence": 1,
          "content": ".",
          "language": "en",
          "speaker": "UU"
        }
      ],
      "attaches_to": "previous",
      "end_time": 273.64,
      "start_time": 273.64,
      "type": "punctuation"
    }
  ]
}