← Master Index
Vol. 16 Module 16.2 Lecture

Google Speech-to-Text

Speech-to-Text (STT) & Voice Models (added)

How This Lesson Fits the Module & Volume

Independent APIs (Whisper, Deepgram, AssemblyAI) are easy to start. Google Cloud Speech-to-Text is what you pick when audio already lives on GCP—GCS, telephony via CCAI, Vertex pipelines, org-level IAM and VPC-SC. Module 16.2 now enters the hyperscaler trio: Google, then Azure, then Amazon Transcribe.

Capability recap remains 16.1 Speech-to-Text. This lecture is catalog engineering: V1 vs V2 (Chirp-class models), streaming vs long-running batch, adaptation, diarization, on-prem options, and how Google’s language coverage and compliance story compare to specialists.

Learning Objectives

By the end of this lesson, students should be able to:

  • Place Google STT in a GCP data plane (GCS audio in, IAM, regionalization).
  • Choose streaming recognize vs long-running batch vs V2 recognizers.
  • Sketch Python for short recognize and GCS long-running jobs with punctuation / diarization.
  • Use phrase hints / adaptation as bias—not as a guarantee of zero WER on jargon.
  • Compare Google vs Whisper / Deepgram / Azure / AWS on streaming, languages, pricing, on-prem.
  • Know when “we are a Google shop” is a sufficient reason—and when a specialist still wins latency.
Definition

Google Cloud Speech-to-Text is Google’s managed ASR API (Speech-to-Text V1 and V2). V2 introduces recognizers (reusable configs) and Chirp-class multilingual models. You can stream mic audio, recognize short buffers, or run long-running jobs over GCS objects—with optional speaker diarization, automatic punctuation, and speech adaptation.

V1 vs V2 (What Engineers Actually Choose)

V1 is the classic SpeechClient with per-request RecognitionConfig. V2 adds recognizer resources, newer Chirp / Chirp 2 / Chirp 3-class models (names evolve), and a cleaner location story. New greenfield GCP work should start on V2 unless a library or CCAI integration still requires V1. Do not mix model IDs across versions in one eval spreadsheet without labeling the API.

Catalog Snapshot (Qualitative)

DimensionGoogle STTDeepgram / AssemblyAIWhisper OSSAzure / AWS
Accuracy postureStrong general + Chirp-class multilingual; domain models (e.g. telephony, video, medical where offered)Specialist conversational / intelStrong multilingual batchPeer hyperscaler quality—eval head-to-head
StreamingFirst-class streaming recognize (gRPC)Deepgram WS-first; AssemblyAI mixedNot nativeFirst-class SDKs
LanguagesVery broad locale list + auto LID optionsCheck per-feature listsVery broadVery broad
Pricing postureTypically per-15-seconds / model tier; batch vs data-logging variants—read current SKU sheetPer-minute + add-onsGPU or OpenAI minutesSimilar cloud metering + commits
On-prem vs cloudCloud default; Speech-to-Text On-Prem (GKE) historically for regulated estates—confirm current productMostly SaaSTrue on-prem weightsAzure containers; AWS VPC endpoints
DiarizationSpeaker diarization config / V2 featuresSimple flagsExternalConversation / speaker labels
PIILogging controls + Cloud DLP on transcripts; not a full AssemblyAI-style intel suite by itselfBuilt-in redact (+ intel)DIYTranscribe redaction / Azure masking

Three Invocation Modes

Recognize (sync)

  • Short audio in the request
  • Simple scripts / buttons
  • Size/time limits apply

Long-running

  • GCS URI for long files
  • Poll Operation
  • Batch archives, podcasts

Streaming

  • gRPC bidirectional
  • Interim + is_final
  • Live captions, IVR

Python: GCS Long-Running Job (V1-style, still widely taught)

Use ADC (gcloud auth application-default login or a service account). Put audio in a bucket the recognizer’s SA can read. Diarization min/max speaker counts are hints, not ground truth.

from google.cloud import speech client = speech.SpeechClient() audio = speech.RecognitionAudio(uri="gs://your-bucket/calls/2026-08-13.flac") diar = speech.SpeakerDiarizationConfig( enable_speaker_diarization=True, min_speaker_count=2, max_speaker_count=6, ) config = speech.RecognitionConfig( encoding=speech.RecognitionConfig.AudioEncoding.FLAC, sample_rate_hertz=16000, language_code="en-US", alternative_language_codes=["es-US"], # optional LID-style help enable_automatic_punctuation=True, model="latest_long", # confirm current model IDs (telephony, video, chirp…) diarization_config=diar, speech_contexts=[speech.SpeechContext(phrases=["SKU-4412", "Naloxone"], boost=15.0)], ) op = client.long_running_recognize(config=config, audio=audio) response = op.result(timeout=900) for result in response.results: alt = result.alternatives[0] print(alt.transcript) # diarization tags often appear on word-level speaker_tag in the last result — parse carefully

V2 Recognizer Sketch

V2 factors config into a recognizer resource. Inline _ recognizers are fine for demos; production should create named recognizers so model + language + features are versioned like any other infra.

from google.cloud.speech_v2 import SpeechClient from google.cloud.speech_v2.types import cloud_speech PROJECT = "your-gcp-project" client = SpeechClient() config = cloud_speech.RecognitionConfig( auto_decoding_config=cloud_speech.AutoDetectDecodingConfig(), language_codes=["en-US"], model="long", # or current Chirp-class ID from docs features=cloud_speech.RecognitionFeatures( enable_automatic_punctuation=True, ), ) req = cloud_speech.RecognizeRequest( recognizer=f"projects/{PROJECT}/locations/global/recognizers/_", config=config, content=open("utterance.wav", "rb").read(), ) resp = client.recognize(request=req) print(resp.results[0].alternatives[0].transcript)

Adaptation, Medical, and Contact Center

Speech adaptation (phrase sets / custom classes) boosts in-vocabulary jargon. It will not invent a robust acoustic model for a new language. Medical and telephony model SKUs exist to match channel characteristics—still run a PHI-aware eval and compliance review. Contact Center AI stacks Speech-to-Text under a larger telephony product; do not double-pay by also sending the same audio to Deepgram unless you are A/B testing.

Pick Google STT when

  • Audio is already on GCS / CCAI / Vertex.
  • You need broad locales + org IAM / VPC-SC.
  • Streaming gRPC + batch Operations in one vendor.
  • On-prem GKE STT is a procurement requirement.

Pick something else when

  • Fastest voice-agent WS without GCP → Deepgram.
  • Turn-key summaries/PII intel → AssemblyAI or AWS Call Analytics.
  • Air-gap open weights → Whisper.
  • Microsoft 365 / Teams estate → Azure Speech.
Common Misconception

“Google’s published language count means every locale has identical WER and feature parity.” Diarization, medical models, streaming limits, and adaptation support vary by language and model. Always read the feature × language matrix for the model ID you ship—then measure WER on that locale’s real audio.

Knowledge Check

  1. Short Answer: Why do GCP-centric teams pick Google STT over Deepgram even if WER is similar? Answer: Data plane / IAM / GCS / CCAI / compliance boundary already on Google Cloud.
  2. True/False: Long-running recognize is the right mode for a 90-minute podcast on GCS. Answer: True.
  3. Multiple Choice: V2 recognizers are: (a) reusable STT configs/resources, (b) TTS voices, (c) GPU dtypes. Answer: (a).
  4. Short Answer: What does speech adaptation actually do? Answer: Biases decoding toward provided phrases/classes; it does not guarantee zero jargon WER.
  5. True/False: Every Google STT language supports the same diarization and medical features. Answer: False—feature parity is per language/model.
  6. Multiple Choice: Streaming Google STT typically uses: (a) only nightly batch CSV, (b) bidirectional gRPC streaming recognize, (c) image captions. Answer: (b).
  7. Short Answer: Name Google’s on-prem posture at a high level. Answer: Cloud default, with an on-prem / GKE Speech-to-Text option for regulated estates (confirm current SKU).
  8. True/False: Phrase boosts replace the need for a gold WER set. Answer: False.
  9. Multiple Choice: Pricing posture is closest to: (a) per-15s / model tier cloud metering, (b) per-character TTS only, (c) one-time Whisper GPU purchase. Answer: (a).
  10. Short Answer: Which vendor lecture is next for Microsoft estates? Answer: Azure Speech Services.

Key Takeaways

  • Google STT is hyperscaler ASR: streaming, sync, and GCS long-running jobs (V1/V2, Chirp-class).
  • Pick it when GCP is the system of record—not only when a blog claims lowest WER.
  • Adaptation, diarization, and medical SKUs are optional levers; eval per locale.
  • On-prem exists as a distinct product path; open Whisper remains the simplest air-gap ASR.
  • Next: Azure Speech Services.
Trainer’s Guide

Lab: Upload a FLAC to GCS, run long_running_recognize with punctuation and a phrase boost for a made-up SKU. Compare WER with/without the boost. If possible, run the same file through Whisper and tabulate qualitative errors (proper nouns, numbers).

Architecture talk: Draw VPC-SC + GCS + STT + DLP + BigQuery. Contrast with sending audio to AssemblyAI. When is the extra Google complexity worth it?

Recap: Google STT is GCP-native streaming and batch ASR. Continue with Azure Speech Services.