diff --git a/examples/foundational/07n-interruptible-google.py b/examples/foundational/07n-interruptible-google.py index 713b3dce3..55c931cf6 100644 --- a/examples/foundational/07n-interruptible-google.py +++ b/examples/foundational/07n-interruptible-google.py @@ -53,7 +53,6 @@ async def main(): stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY")) tts = GoogleTTSService( - credentials=os.getenv("GOOGLE_CREDENTIALS"), voice_id="en-US-Neural2-J", params=GoogleTTSService.InputParams(language="en-US", rate="1.05"), ) diff --git a/src/pipecat/services/google.py b/src/pipecat/services/google.py index 55a2576d2..a02471040 100644 --- a/src/pipecat/services/google.py +++ b/src/pipecat/services/google.py @@ -40,7 +40,7 @@ try: except ModuleNotFoundError as e: logger.error(f"Exception: {e}") logger.error( - "In order to use Google AI, you need to `pip install pipecat-ai[google]`. Also, set `GOOGLE_API_KEY` environment variable." + "In order to use Google AI, you need to `pip install pipecat-ai[google]`. Also, set `GOOGLE_APPLICATION_CREDENTIALS` environment variable." ) raise Exception(f"Missing module: {e}") @@ -287,8 +287,6 @@ class GoogleTTSService(TTSService): elif credentials_path: # Use service account JSON file if provided creds = service_account.Credentials.from_service_account_file(credentials_path) - else: - raise ValueError("Either 'credentials' or 'credentials_path' must be provided.") return texttospeech_v1.TextToSpeechAsyncClient(credentials=creds)