Skip to content

ivekit-google feature request — credentials param on STT & TTS (issue-template format) #6586

Description

@delfinZGangesu

Feature Type

Would make my life easier

Feature Description

google.STT and google.TTS (Google/Vertex Speech-to-Text and Text-to-Speech) only support authentication via credentials_info (a service-account-key dict),credentials_file (a path on disk), or google.auth.default() (environment-based ADC). There's no way to pass a google.auth.credentials.Credentials` object directly.

This is a problem for setups using Workload Identity Federation with custom credential providers, where credentials are obtained in memory and don't exist as files on disk.
RealtimeModel already accepts a credentials parameter, and every other Google client library (Secret Manager, Storage, Cloud SQL, etc.) accepts one too. STT and TTS should match — especially since both already build their underlying client with credentials=<object> internally (STT._create_client,
TTS._ensure_client); they just derive that object from a file first. The ask is to allow that object to be supplied directly.

Proposed change: add an optional credentials parameter to google.STT and google.TTS and pass it through to the underlying SpeechAsyncClient /TextToSpeechAsyncClient. Defaults to NOT_GIVEN, so no behavior change for existing callers.

Workarounds / Alternatives

Subclassing the plugin to override client creation, or serializing the in-memory credentials to a temporary file — both fragile and version-coupled.

Additional Context

Same request as the one already accepted for RealtimeModel (add a credentials parameter) — this extends that parity to the STT and TTS plugins in the same livekit-plugins-google package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions