googleapis / googleapis/google-cloud-node

NodeJS Google Cloud Speech To Text - LongRunningRecognize - Could not load the default credentials

Open
#4,897 8 comments 0 reactions 0 assignees View on GitHub
priority: p2 type: bug
Dominant language
TypeScript
Stars
3.2k
Forks
712
Avg merge
2d 3h
Merged PRs (30d)
99

Description

#### Environment details

- which product (packages/*): @google-cloud/speech
- OS: Windows 10
- Node.js version: 18.15.0
- npm version: 9.3.1
- google-cloud-node version: 6.1.0 (@google-cloud/speech)

#### Steps to reproduce

I'm using Google Cloud Speech To Text in NodeJS.

I specified the correct path to the google cloud credentials in process.env.GOOGLE_APPLICATION_CREDENTIALS.

The normal recognize works as expected:

const [response] = await speechClient.recognize(options);

However, the long running recognize throws an error:

const [operation] = await speechClient.longRunningRecognize(options);
const [response] = await operation.promise();

The second line throws the following error:

> Could not load the default credentials.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.