I am using livekit google realtime model gettin th...
# ask-ai
b
I am using livekit google realtime model gettin this error in initalisation input_audio_transcription=types.AudioTranscriptionConfig( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ language_code=“en-US”, ^^^^^^^^^^^^^^^^^^^^^^ ), ^ File “/Users/madhavsharma/uplevel-livekit-worker/venv/lib/python3.13/site-packages/pydantic/main.py”, line 253, in init validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) pydantic_core._pydantic_core.ValidationError: 1 validation error for AudioTranscriptionConfig language_code Extra inputs are not permitted [type=extra_forbidden, input_value=‘en-US’, input_type=str]
t
Thanks for reaching out, Madhav. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It looks like the error is happening because the configuration object for
AudioTranscriptionConfig
doesn’t quite match what’s expected. Here’s how you can fix it: • Make sure you’re using the right field names. For instance, use
language
instead of
language_code
. • Only include supported fields like
model
and
language
, both as strings. Try to avoid any extra or unsupported keys. • If you don’t need transcription, just set the field to
null
. • Double-check that the SDK version you’re using supports the fields and structure you’ve got in your configuration. Here’s an example to help:
Copy code
input_audio_transcription = types.AudioTranscriptionConfig(
    model='gemini-2.0-flash-transcribe',
    language='en-US'
)
If you have any more questions or need a hand with this, just let me know—I’m here to help! Sources: plugins/openai/src/realtime/realtime_model.ts | livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/s...
b
input_audio_transcription --
Copy code
input_audio_transcription=types.AudioTranscriptionConfig(           language_code="en-US"       ),
how to set this up, can you share import statements for this
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!