By the end of this guide you will have sent an audio file to a speech-to-text API from your own code and received a transcript you can store, search or display. The job is done by a hosted transcription service (or a library you run yourself): you authenticate with a key, send the audio, choose options such as language, and read the text from the response.
If you need a speech-to-text API for an app, a pipeline or a batch of recordings, the choices are a managed cloud service, a hosted open-source model, or a model you run on your own hardware. This guide covers the steps and compares six options from our Audio and voice category.
Key takeaways
- Create an account and API key, send a short test file, add language and speaker options, then run your full audio and check the transcript against what was said.
- The main decision is where the model runs: a managed API (Deepgram, OpenAI API, Groq, Cartesia), a hosted Whisper service (Whisper API), or your own machine (whisper.cpp).
- Billing differs by provider, from per-token rates (OpenAI API, Groq) to credits (Whisper API, Cartesia) and prepaid plans (Deepgram), so estimate cost on a sample before you commit to a large batch.
- Transcripts are drafts. Spot-check names, numbers and quotes, and think about privacy before you upload recordings of other people.
What you need before you start
- An audio file or stream. A recorded file in a common format, or a live source if you need real-time results.
- An API key. You get this by signing up with the provider. Keep it out of your source code.
- A place to run code. A script in any language that can make an HTTP request, or a provider's SDK. You can also try some services in a browser dashboard first.
- Time. Under an hour for a first working transcript, longer if you add queues, retries and storage.
- Difficulty. Moderate. You need to read API documentation and handle errors. Running a model yourself is harder.
- Consent. If the recording has other people in it, make sure you have the right to transcribe and store their speech.
Which kind of AI tool fits this job
Choose by where the audio should be processed and what you need around the text.
A managed voice AI platform. Deepgram offers speech-to-text through APIs that handle recorded and live audio. Its listing mentions speaker diarization, smart formatting, keyterm prompting and automatic language detection. It runs as a managed service with US, EU and Australia endpoints, or in-VPC and self-hosted for compliance needs. Cartesia lists Ink speech-to-text with realtime WebSocket endpoints, billed in credits.
A general model provider. OpenAI API gives developers access to transcription models alongside text, image and realtime voice models, billed per million tokens, with rate limits set per organisation and project.
A hosted Whisper service. Whisper API runs its own hosted copy of the open-source Whisper model. You send a file or remote URL to a single endpoint, choosing language, output format and model size. It also has a browser dashboard, so you can try files without code. Groq serves open models, including Whisper speech-to-text, through an OpenAI-compatible API on its own hardware.
A model you run yourself. whisper.cpp is an open-source C and C++ port of Whisper that runs offline on CPUs, Apple Silicon and many GPUs. It is free to use and self-host, which suits private or offline use, but you download and convert models yourself.
Step 1: Define what you need to transcribe
A few decisions up front keep you from choosing the wrong service.
- Decide if you need real-time transcription (live audio) or batch transcription (files).
- Note the languages in your audio and whether several languages can appear in one file.
- Decide if you need speaker labels (who said what) and timestamps.
- Estimate total audio length per month, since pricing varies by provider.
- Decide if the audio is allowed to leave your servers.
Check it worked by writing the five answers in a short note you can compare with each provider's listing.
Step 2: Choose a provider and get a key
Pick one service for a first test, not a final commitment.
- Shortlist from the table below, matching your answers from Step 1.
- Create an account. Deepgram's Pay As You Go starts with $200 in free credit and no card, and Whisper API gives new accounts 5 free credits to test.
- Create an API key and store it as an environment variable or in a secrets manager.
- Note the rate limits. OpenAI API limits apply per organisation and project and vary by usage tier.
Check it worked by making a test call that returns a response and not an authentication error.
Step 3: Send a short test file
Start small so mistakes cost little.
- Choose a clear 30 to 60 second clip with two or three speakers.
- Send it to the transcription endpoint. With Whisper API you can upload a file or pass a remote URL. whisper.cpp's command-line example accepts only 16-bit WAV files, so other formats need ffmpeg conversion.
- Pass the language if you know it, or use automatic detection where the service offers it. Whisper API detects the spoken language across 98+ languages.
- Print the raw response and read it.
Check it worked by comparing the transcript with the audio, line by line.
Step 4: Add options for speakers, language and formatting
Turn on the features your use case needs.
- Enable speaker diarization if you need labels. Whisper API lists it as an option that affects the credit cost, and Deepgram lists it with smart formatting.
- Add custom vocabulary for names and jargon. Deepgram lists keyterm prompting.
- Choose a model size if the service lets you. Whisper API offers model sizes from tiny to large-v3, with tiny, small and medium on the free tier.
- Pick an output format. Whisper API's documentation lists text and srt as API output formats, while its dashboard exports more.
Check it worked by running the same clip again and seeing the new options reflected in the output.
Step 5: Handle real files and long audio
Production audio is longer and messier than a test clip.
- Check file size and length limits. Whisper API accepts files up to 10GB with a Pro subscription.
- Convert audio to a format the service accepts, using a tool like ffmpeg.
- Run files in a queue, with retries for network errors and rate-limit responses.
- Save the response with your own record id, so you can match transcripts to source files.
Check it worked by transcribing a full-length file and confirming the text covers the whole recording.
Step 6: Check accuracy and cost
Measure the result before you scale up.
- Spot-check names, numbers and technical terms against the audio.
- Look for dropped sentences, repeated text and wrong speakers, especially when people talk over each other.
- Calculate the cost for a typical file. Whisper API bills per started hour and by model size, diarization and file size. Groq, OpenAI API and Deepgram each publish their own rate structures on their pricing pages.
- Compare two providers on the same clip if the choice is close.
Check it worked by having a cost figure for one hour of audio that you can multiply by your monthly volume.
Step 7: Store the output and protect the data
Treat the transcript as data you own and secure.
- Save the transcript and the source audio in your own storage. Whisper API deletes uploaded files after 24 hours and keeps only the transcript, so keep your own copies.
- Read the provider's data terms. Whisper API says your content is never used to train models or sent to OpenAI. Check the equivalent for the provider you choose.
- If audio must stay in your network, look at Deepgram's in-VPC and self-hosted options or run whisper.cpp yourself.
- Delete recordings you no longer need.
Check it worked by finding the stored transcript and its source file from your own database.
Tools for this job compared
| Tool | Good fit for | Pricing | Stated limits |
|---|---|---|---|
| Deepgram | Recorded and live audio with diarization, via API or self-hosted | Freemium | Developer-oriented; concurrency limits vary by plan; self-serve support is community and Discord |
| Whisper API | Hosted Whisper with a dashboard and pay-as-you-go credits | Free trial | 5 free credits for new accounts; files deleted after 24 hours; docs list only text and srt API output |
| OpenAI API | Transcription alongside text and voice models, in one account | Paid, from $0.1, usage-based (checked 24 Oct 2026) | Rate limits apply per organization and project and vary by model and usage tier |
| whisper.cpp | Free, offline transcription on your own hardware | Open source | whisper-cli accepts only 16-bit WAV; you download and convert models yourself |
| Groq | Whisper speech-to-text through an OpenAI-compatible API | Freemium | Free plan has low rate limits; preview models may be discontinued at short notice |
| Cartesia | Realtime speech-to-text with credit-based billing | Freemium, paid from $5/mo (checked 24 Oct 2026) | Separate concurrency limits per service; with overages off, requests fail once credits are used |
Prices and plan limits change, so confirm the current terms on each vendor's site before you subscribe.
Common mistakes to avoid
- Testing only on clean audio. A studio-quality clip hides the problems you will see with phone calls, accents and crosstalk. Fix it by also testing a noisy, multi-speaker sample.
- Ignoring file retention rules. Some services delete uploads quickly, as Whisper API does after 24 hours. Fix it by saving your own copy of the audio and transcript.
- Estimating cost from the headline rate. Billing may depend on model size, started hours, diarization or file size. Fix it by pricing a real sample file.
- Hard-coding the API key. Keys in source control get leaked. Fix it by loading the key from the environment or a secrets store.
- Sending private recordings without checking terms. Calls, interviews and medical or legal audio carry confidentiality duties. Fix it by getting consent, reading the vendor's data terms, and using a self-hosted option such as whisper.cpp where audio must stay local.
How we put this together
This is an evidence-based guide built from each tool's listing in our directory, which is compiled from the vendor's own site and pricing page. It is not a review based on using the tools. We don't rank tools, and nobody paid to be included. Some outbound links may be affiliate links; see our disclosure.
Frequently asked questions
Is there a free speech-to-text API?
Several have a free route with limits. whisper.cpp is free to use and self-host, Deepgram's Pay As You Go starts with $200 in free credit, Whisper API gives new accounts 5 free credits, and Groq has a Free plan with low rate limits. Free tiers are for testing rather than large batches.
How accurate is a speech-to-text API?
It depends on audio quality, accents, background noise and specialist vocabulary, and none of these listings publish a guaranteed accuracy figure. Test your own audio and spot-check the output. Have a person review transcripts used for legal, medical, financial or academic purposes.
Can I transcribe audio without sending it to the cloud?
Yes. whisper.cpp runs offline on your own machine, and Deepgram lists in-VPC and self-hosted deployment. You will need to set up the models and hardware yourself.
Can an API label who is speaking?
Some can. Deepgram lists speaker diarization, and Whisper API lists a diarization option that affects the credit cost. Check the provider's documentation for how speakers are labelled and whether it works for your audio.
How long does it take to transcribe a file?
The listings do not publish a standard processing time for batch files. Some APIs also offer streaming, so text arrives while the audio is still playing. Run a sample file and time it before planning around a deadline.
Compare more options in our Audio and voice category. If you just need a transcript of an episode, see How to transcribe a podcast with AI.