Skip to content

New to Google Cloud Platform; running the sample gives auth error? #329

@willemmulder

Description

@willemmulder

I'm new to the Google Cloud Platform and was happy to find this repo of examples.

However, when I simply follow the instructions I seem to get an auth error?

node recognize.js stream ./resources/audio.raw -e LINEAR16 -r 16000

Gives me

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.

Which points to a page full of information about authentication, except the information I'm looking for: how can I simply pass an API key to the Speech client so it just simply works?

Could the documention be updated to instruct step-by-step how to do auth? Would it be possible to make that work something like

Speech({ apikey: [somekey] }); 

? Or is there a reason not to make it that easy?
Right now it feels like there are so many implicit assumptions and things around auth that scare newcomers away.

Would be happy to help in any way once I understand how it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🚨This issue needs some love.triage meI really want to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions