feat(google): support universal credential types in STT and TTS credentials_file#5056
Merged
chenghao-mou merged 2 commits intolivekit:mainfrom Mar 13, 2026
Merged
feat(google): support universal credential types in STT and TTS credentials_file#5056chenghao-mou merged 2 commits intolivekit:mainfrom
chenghao-mou merged 2 commits intolivekit:mainfrom
Conversation
Contributor
Author
|
Hi @chenghao-mou , can you try to have a look at the change please? :) |
| elif is_given(self._credentials_file): | ||
| client = client_cls.from_service_account_file( | ||
| self._credentials_file, client_options=client_options | ||
| credentials, _ = google.auth.load_credentials_from_file( # type: ignore[no-untyped-call] |
Member
There was a problem hiding this comment.
we should save this project_id so we can reuse it later in _get_recognizer, otherwise, it might default back to the default credential.
Contributor
Author
There was a problem hiding this comment.
Great idea, thanks! I've committed a fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, the Google STT and TTS plugins loaded file-based credentials using from_service_account_file, which only supports service account JSON. This prevented users from using other credential types such as Workload Identity
Federation (WIF), Google Workload Identity (GWI), or external account credentials.
Changes:
library (service accounts, WIF external accounts, GWI, authorized user credentials, etc.)