ripe-arm-36009
09/08/2025, 5:51 AMtall-airline-16756
09/08/2025, 5:51 AMtall-airline-16756
09/08/2025, 5:52 AMpip install "livekit-agents[google]~=1.2" to grab the plugin you need.
2. Set Up Authentication: You’ve got a few options to provide your Google Cloud credentials:Don’t forget to enable the Cloud Speech-to-Text API in your Google Cloud project—this step is important!
◦ Pass them directly using the credentials_info dictionary.
◦ Save them in a JSON file and set the GOOGLE_APPLICATION_CREDENTIALS environment variable.
◦ Or simply use Application Default Credentials (ADC).
1. Configure and Use: Create your Google STT instance within a LiveKit AgentSession or run it as a standalone service. Here’s a quick example:
from livekit.plugins import google
session = AgentSession(
stt=google.STT(
model="chirp", # The 'chirp' model is great for better accuracy
spoken_punctuation=False,
),
# You can add other components like LLM, TTS, and more here
)
If you want to dive deeper into configuration options, troubleshoot any hiccups, or explore advanced features, check out the Google ecosystem guide and the Voice AI Quickstart Guide. Happy coding!
Sources: Google Cloud STT integration guide | LiveKit Docs | livekit-plugins/livekit-plugins-google/livekit/plugins/google/beta/realtime...