steep-balloon-41261
12/28/2025, 5:39 PMtall-airline-16756
12/28/2025, 5:39 PMtall-airline-16756
12/28/2025, 5:39 PMinput_audio_transcription (or inputAudioTranscription) option.
Examples:
Python
from livekit.plugins import google
from google.genai import types
session = AgentSession(
llm=google.realtime.RealtimeModel(
input_audio_transcription=types.AudioTranscription(
language="es" # restricts STT to Spanish (ISO-639-1 code)
),
voice="Puck",
instructions="You are a helpful assistant."
),
vad=silero.VAD.load()
)
Node.js / TypeScript
import * as google from '@livekit/agents-plugin-google';
const session = new voice.AgentSession({
llm: new google.realtime.RealtimeModel({
inputAudioTranscription: {
language: "es" // restricts STT to Spanish (ISO-639-1 code)
},
voice: "Puck",
instructions: "You are a helpful assistant."
}),
vad: await silero.VAD.load()
});
Notes:
• Use an ISO-639-1 code (e.g., en, es, fr).
• If you don’t set this, transcription may attempt to detect/handle multiple languages.
Would you like an example for a different language or help adding this to your existing code?
Sources: Gemini Live API plugin | LiveKit docsrich-keyboard-96538
12/28/2025, 5:40 PMtall-airline-16756
12/28/2025, 5:40 PMinput_audio_transcription language field accepts a single ISO-639-1 code (for example en, es, fr) to restrict STT to one language.
If you need multi-language support, would you like options for:
• detecting language first and then reconfiguring transcription per detected language, or
• running parallel transcriptions with separate model instances for each language?rich-keyboard-96538
12/28/2025, 5:44 PMtall-airline-16756
12/28/2025, 5:44 PMAttributeError: module 'google.genai.types' has no attribute 'AudioTranscription' when trying to set input_audio_transcription. Let's troubleshoot and fix that.
Could you tell me:
• which LiveKit / agents plugin package and version you have installed (pip show livekit-agents or contents of requirements.txt)?
• the exact import lines you're using now?
Quick fixes to try now:
• Use the plugin's types import instead of google.genai.types. Example:
from livekit.plugins.google.types import AudioTranscription
from livekit.plugins import google
from livekit.agents import AgentSession
session = AgentSession(
llm=google.realtime.RealtimeModel(
model="gemini-2.5-flash",
input_audio_transcription=AudioTranscription(language="es")
)
)
• If that import still fails, upgrade the package: pip install --upgrade "livekit-agents[google]" (ensure version is ~1.3+).
Note on language restriction: the plugin supports setting a single ISO-639-1 code via language (e.g., en, es). Passing multiple languages at once is not supported.
If you share your package version and current imports, I’ll give the exact code or next steps.
Sources: Gemini Live API plugin | LiveKit docsrich-keyboard-96538
12/28/2025, 6:24 PMerror_details_ext extension for
details. [field_violations {
field: "config.features.enable_automatic_punctuation"
description: "Recognizer does not support feature: automatic_punctuation"
}
]tall-airline-16756
12/28/2025, 6:24 PMenable_automatic_punctuation) being sent to the Google/Gemini realtime path.
What happened: Gemini Realtime uses its own built-in transcription and rejects Google STT config fields (like automatic punctuation). That causes the InvalidArgument error in livekit/plugins/google/stt.py when the plugin forwards an unsupported config.
What to do next:
• Stop passing Google STT config objects into the Gemini realtime model. Instead set the language via the RealtimeModel parameter:
◦ Python: use language_code="es-ES" in google.realtime.RealtimeModel(...)
◦ Node: use languageCode: "es-ES" in new google.realtime.RealtimeModel({...})
• Remove or avoid input_audio_transcription / external STT config that includes fields such as enable_automatic_punctuation.
• If you need punctuation or other STT features not supported by Gemini Realtime, run an external STT pipeline separately (not via input_audio_transcription) and feed its results into your app.
To help further, please share:
• The AgentSession / RealtimeModel code you're running (exact snippet).
• Output of:
◦ pip show livekit-agents and pip show livekit-plugins-google (or your package manager equivalents).
I can then point to the exact code change or patch to remove the unsupported fields.
Sources: Gemini Live API plugin | LiveKit docs | Realtime model plugins | LiveKit Docsrich-keyboard-96538
12/28/2025, 6:25 PMtall-airline-16756
12/28/2025, 6:25 PMenable_automatic_punctuation, multiple languages, punctuate) into the Gemini realtime path, which rejects those fields. Gemini Realtime uses its own built-in STT and expects language via the RealtimeModel language_code (BCP-47), not the Google STT plugin config.
What to change
• Remove or stop passing google.STT(...) options into the Gemini realtime model when that model is used for transcription.
• Set the language on the RealtimeModel with language_code.
• If you still need a separate STT instance (for turn detection or a different pipeline), run it independently and do not feed its config fields into the Gemini realtime config.
Suggested corrected pattern (Python sketch)
# Use RealtimeModel for Gemini realtime audio + language setting
llm = google.realtime.RealtimeModel(
model=model_id,
language_code="en-US", # set desired BCP-47 language
temperature=temperature,
max_output_tokens=200,
top_p=0.95,
# no input_audio_transcription / no external STT fields here
)
# If you need an external STT process, run it separately (not passed into Gemini)
external_stt = google.STT(
languages=["en-US", language],
detect_language=True,
interim_results=True,
use_streaming=True,
sample_rate=16000,
# DO NOT pass enable_automatic_punctuation or other Gemini-unsupported fields
)
Quick checklist to avoid the InvalidArgument error
• Remove enable_automatic_punctuation, punctuate, and similar fields from any config that ends up sent to the Gemini realtime plugin.
• Do not pass an array of languages to Gemini; set a single language_code on the RealtimeModel.
• If you need punctuation or multi-language transcription, perform that outside Gemini (post-process or separate STT service).
If you want, share:
• The exact AgentSession / RealtimeModel/llm instantiation code you use now, and
• pip show livekit-agents and pip show livekit-plugins-google outputs
I’ll give the minimal patch or code edits to fix the error.