Google Cloud STT integration guide

How to use the Google Cloud STT plugin for LiveKit Agents.

Overview

Google Cloud provides a streaming STT service with support for over 125 languages and access to the foundational model chirp, which provides improved recognition and transcription for spoken languages and accents. You can use the open source Google Cloud plugin for LiveKit Agents to build voice AI with fast, accurate transcription.

Quick reference

This section includes a basic usage example and some reference material. For links to more detailed documentation, see Additional resources.

Installation

Install the plugin from PyPI:

pip install "livekit-agents[google]~=1.0rc"

Authentication

Google Cloud credentials must be provided by one of the following methods:

  • Passed in the credentials_info dictionary.
  • Saved in the credentials_file JSON file (GOOGLE_APPLICATION_CREDENTIALS environment variable).
  • Application Default Credentials. To learn more, see How Application Default Credentials works

Usage

Use a Google Cloud STT in an AgentSession or as a standalone transcription service. For example, you can use this STT in the Voice AI quickstart.

from livekit.plugins import google
session = AgentSession(
stt = google.STT(
model="chirp",
spoken_punctuation=False,
),
# ... llm, tts, etc.
)

Parameters

This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.

languagesLanguageCodeOptionalDefault: en-US

Specify input languages. For a full list of supported languages, see Speech-to-text supported languages.

spoken_punctuationbooleanOptionalDefault: True

Replace spoken punctuation with punctuation characters in text.

modelSpeechModels | stringOptionalDefault: long

Model to use for speech-to-text. To learn more, see Select a transcription model.

credentials_infoarrayOptional

Key-value pairs of authentication credential information.

credentials_filestringOptional

Name of the JSON file that contains authentication credentials for Google Cloud.

Additional resources

The following resources provide more information about using Google Cloud with LiveKit Agents.