canonical: https://jentic.com/apis/googleapis.com/speech

# Google Cloud Speech-to-Text API

The Cloud Speech-to-Text API converts spoken audio into text using Google's speech recognition models. It supports synchronous recognition for short clips, long-running recognition for multi-minute audio passed by Cloud Storage URI, and adaptation through phrase sets and custom classes that bias the recogniser toward domain-specific vocabulary. Typical inputs are LINEAR16, FLAC, or OGG_OPUS audio with the language code declared on the request.

## For AI agents

Transcribe speech audio to text with optional phrase-set bias. Supports short synchronous calls and long-running jobs for multi-minute recordings.

## Scope

Does not handle text-to-speech synthesis, speaker diarization training, or live in-browser microphone capture - use for converting recorded or streamed audio to text only.

## Capabilities

- Transcribe a short audio clip synchronously and return the recognised text and word-level confidence
- Submit a long-running recognition job for audio stored in Cloud Storage and poll for results
- Bias the recogniser toward domain vocabulary by attaching a phrase set or custom class
- Manage phrase sets - collections of weighted phrases - at the project level
- Manage custom classes that group named entities for reuse across phrase sets
- Cancel or inspect long-running speech recognition operations

## Use cases

### Call Centre Transcription

Transcribe recorded customer support calls into searchable text for QA review. Calls are uploaded to Cloud Storage and submitted via POST /v1/speech:longrunningrecognize, which returns an operation handle. The job runs asynchronously and the resulting transcript is fetched via the operations endpoint, typically within minutes.

Example prompt: POST /v1/speech:longrunningrecognize with audio.uri=gs://calls/abc.flac and config.languageCode=en-US, then poll GET /v1/operations/{name} until done.

### Voice Note Capture in a Field App

A mobile field service app records short voice notes and sends them to the Speech-to-Text API for synchronous transcription. POST /v1/speech:recognize accepts audio inline as base64 or by Cloud Storage URI and returns the transcript in the same response, suitable for clips up to about a minute long.

Example prompt: POST /v1/speech:recognize with audio.content=<base64 LINEAR16> and config.languageCode=en-GB; return the alternatives[0].transcript.

### Domain-Adapted Medical Dictation

Improve recognition accuracy for clinicians by creating a phrase set containing common drug names, procedures, and anatomical terms. The phrase set is then referenced in each recognise call's adaptation config so the model is biased toward those terms during decoding.

Example prompt: POST /v1/{+parent}/phraseSets with phrases=[{value:'amoxicillin',boost:15},...], then call recognize with adaptation.phraseSets=['projects/p/locations/global/phraseSets/meds'].

### AI Agent Voice-Driven Workflow

An AI agent receives a voice message from a user, transcribes it via the Speech-to-Text API through Jentic, and then routes the transcript to its downstream reasoning step. The agent searches for the recognise operation, loads the schema, and executes - Jentic handles auth so the agent never sees the underlying credentials.

Example prompt: Search Jentic for 'transcribe an audio file', execute POST /v1/speech:recognize with the user's audio content and languageCode='en-US', then pass alternatives[0].transcript to the next reasoning step.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/speech:recognize | Synchronously transcribe a short audio clip |
| POST | /v1/speech:longrunningrecognize | Submit a long audio file for asynchronous transcription |
| GET | /v1/operations | List long-running recognition operations |
| GET | /v1/operations/{+name} | Get the status and result of a long-running recognition job |
| GET | /v1/{+parent}/phraseSets | List phrase sets in a project location |
| GET | /v1/{+parent}/customClasses | List custom classes in a project location |

## Key resources

- **speech** — Synchronous and long-running speech recognition over inline audio or Cloud Storage URIs.
- **projects.locations.phraseSets** — Create, list, get, update, and delete phrase sets that bias recognition toward domain vocabulary.
- **projects.locations.customClasses** — Manage custom classes - named entity groups reusable across phrase sets.
- **operations** — Track and cancel long-running recognition operations.

## Why Jentic

- **Setup:** Wiring the Cloud Speech-to-Text API by hand means configuring a service account, minting OAuth access tokens against speech.googleapis.com, and polling long-running operations yourself. Through Jentic you install once, import the Cloud Speech-to-Text API from the API Directory, store the OAuth credential once, and your agent calls it.
- **Permission scoping:** Speech-to-Text puts the project resource in the URL path for phrase sets and custom classes (/v1/{parent}/phraseSets), and recognition runs against a fixed endpoint, so limit the agent to the operations it needs, such as speech.recognize and reading operation status. You choose the operations it may call, so managing phrase sets or custom classes is not included unless you add them.
- **Credential handling:** Your Speech-to-Text OAuth credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'transcribe an audio file' or 'submit a long audio for transcription', and Jentic returns the matching Speech-to-Text operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Deepgram API** — Deepgram offers fast, streaming-first speech recognition with on-prem options.
- **AssemblyAI API** — AssemblyAI bundles transcription with summarisation, topic detection, and PII redaction.
- **Cloud Text-to-Speech API** — Text-to-Speech generates audio from text; Speech-to-Text does the reverse.
- **Cloud Translation API** — Translate the transcribed text into another language for multilingual workflows.

## FAQ

### What authentication does the Cloud Speech-to-Text API use?

The Cloud Speech-to-Text API uses OAuth 2.0 with the cloud-platform scope. Through Jentic, OAuth credentials are stored in your Jentic One instance and exchanged for short-lived access tokens, so service-account JSON keys never enter the agent context.

### Can I transcribe long audio files with the Speech-to-Text API?

Yes. POST /v1/speech:longrunningrecognize accepts a Cloud Storage URI and returns an operation that can be polled via GET /v1/operations/{name}. This is the recommended path for any audio longer than about 60 seconds, where the synchronous recognise endpoint times out.

### What are the rate limits for the Cloud Speech-to-Text API?

Default project quotas are 900 requests per minute and 480 minutes of audio per minute, with stricter limits on long-running submissions. Quotas are visible in the Google Cloud Console under IAM and admin > Quotas and can be raised on request.

### How do I improve recognition of brand or technical terms?

Create a phrase set via POST /v1/{+parent}/phraseSets with the target terms and a boost value, then reference the phrase set in the adaptation field of the recognise request. This biases the recogniser toward the supplied vocabulary without retraining a model.

### How do I run transcription through Jentic?

Search Jentic for 'transcribe an audio file', load the speech.recognize or speech.longrunningrecognize schema, and execute. Jentic returns the operation result for sync calls and the long-running operation handle for async jobs, which the agent can poll via the operations endpoint.

### Is the Cloud Speech-to-Text API free?

Google offers 60 minutes of free transcription per month, after which usage is billed per 15-second increment, with different rates for standard, video, and medical models. Phrase set storage is free; data adaptation usage is billed at standard rates.

### Can I limit what my agent is allowed to do with the Cloud Speech-to-Text API?

Yes. Because you run Jentic One yourself, your own rules decide which Speech-to-Text operations and credentials the agent may use. You can allow it only what it needs, such as speech.recognize for short clips, speech.longrunningrecognize for long audio, and reading operation status, while leaving out phrase set and custom class management unless you explicitly add those. The stored OAuth credential is injected at execution time and never enters the agent's prompt or logs.
