Skip to content

Reading file from google storage using async call gives error #364

Description

@mishaetaya

Hello,

I've been trying to make the asynchronous call startRecognition(gcsUri, config) but getting the following error: Error: Requested entity was not found.

my gcsUri is gs://bucket/file.wav

config = {encoding: 'LINEAR16',
	  sampleRateHertz: 8000,
	  languageCode: 'en-US'}

Any guidance would be appreciated.

Thank you

best

Activity

  1. jmdobry commented on Apr 26, 2017

    @jmdobry
    Member

    Is your gcsUri really gs://bucket/file.wav, or did you change out the real names for placeholder names?

  2. mishaetaya commented on Apr 26, 2017

    @mishaetaya
    Author

    apologies, yes those are placeholders indeed (not real names). It started to work actually, but all I did differently was to comment out the projectId in

    var gcs = require('@google-cloud/storage')({
    // projectId: process.env.GCLOUD_PROJECT,
    credentials: require('key.json')
    });

    ... and I originally didn't have 'transcription' defined as a const because it was defined as a 'var' further up in the file. I changed it to be defined in the scope of the startRecognition function. I'm glad that it is working, but I don't really understand why these two changes resolved the error, or what that error was.

  3. mishaetaya commented on Apr 26, 2017

    @mishaetaya
    Author

    ...sorry, the error is back. ugh.

    so this is the full error:

    { Error: Requested entity was not found.
    at /Users//Documents//node_modules/grpc/src/node/src/client.js:434:17
    code: 5,
    metadata: Metadata { _internal_repr: {} },
    note: 'Exception occurred in retry method that was not classified as transient' }

    it seems if the audio is a few seconds long it makes the transcription, but as soon as I try to record something more lengthy I get that error. I've tried 1.5 mins and even 40 seconds, both threw the error.

  4. mishaetaya commented on Apr 27, 2017

    @mishaetaya
    Author

    apologies, this should not have been an issue. It was an asynchronous issue...I was running the transcription before the files posted to google cloud (hence why longer audio wasn't working, but shorter audio was). solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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