Skip to main content
Speech to TextBatch transcription

Quickstart

Learn how to transcribe pre-recorded audio and video files.

The quickest way to try transcribing for free is by creating a Speechmatics account and using our web portal.


Set up your transcription job and click the button on the output page to get the code and use it in the API.

Using the Batch API

1. Create an API key

Create an API key in the portal here, which you'll use to securely access the API. Store the key as a managed secret.

Enterprise customers may need to speak to Support to get your API keys.

2. Pick and install a library

Check out our Batch Python client or JavaScript client to get started.

Install using pip:

pip install speechmatics-batch

3. Grab a sample file

Download and save our example.wav

4. Insert API key

Paste your API key into YOUR_API_KEY in the code below.

import asyncio
from speechmatics.batch import AsyncClient, TranscriptionConfig

API_KEY = "YOUR_API_KEY"
AUDIO_FILE= "example.wav"

config = TranscriptionConfig(
diarization="speaker"
)

async def main():
client = AsyncClient(api_key=API_KEY)
result = await client.transcribe(
audio_file=AUDIO_FILE,
transcription_config=config
)
print(result.transcript_text)
await client.close()

asyncio.run(main())

You should see the following output:

SPEAKER S1: Welcome to Speechmatics. We're delighted that you've decided to try our speech to text software to get going. Just create an API key and submit a transcription request to our API. We hope you'll be very impressed by the results. Thank you.

Next Steps

Now that you have a basic transcription working, explore these features to get more out of your audio.