GoogleCloudPlatform/firebase-extensions

Can not run speech to text extension locally

Closed this issue · 6 comments

[REQUIRED] Step 2: Describe your configuration

  • Extension name: googlecloud/speech-to-text
  • Extension version: 0.1.5
  • Configuration values (redact info where appropriate):
COLLECTION_PATH=transcriptions
ENABLE_AUTOMATIC_PUNCTUATION=true
EXTENSION_BUCKET=project-stage.appspot.com
LANGUAGE_CODE=de-DE
LOCATION=europe-west3
MODEL=default

I replaced the real project name.

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

  • install the extension locally via firebase ext:install --local googlecloud/speech-to-text (set config resulting int he configuration from above)
  • enable firestore and firebase storage in the firebase.json
"firestore": {
    "rules": "firestore/firestore.rules",
    "indexes": "firestore/firestore.indexes.json"
  },
  "storage": {
    "rules": "storage/storage.rules"
  },
  "extensions": {
    "speech-to-text": "googlecloud/speech-to-text@0.1.5"
  },
  • run the emulator via firebase emulators:start
  • open the emulator UI
  • upload an audio file in the emulator storage
Expected result
  • the extension runs successfully
  • the transcribed audio gets put into firestore
Actual result
  • the extension run fails with the error Error: 5 NOT_FOUND: No such object: project-stage.appspot.com/tmp/cde16c4b-485c-42a4-8a18-006a17234fad/audiofile.m4a.wav

My thoughts

  • it seems like the speech API (running in the real gcloud project) is called in a way, that it tries to access the audio file from the real storage
  • but the file is only in the emulator storage

-> how can I get it working with my storage locally?

Thanks for reporting, I can reproduce the issue locally, looking into it!

I dont think this is possible, it's blocked as the speech to text API is a long-running operation, which writes to a production bucket.

see #299 for example

I see. If that's how it is, then it's a pity. Would be great to really work with the extension also locally.

Keeping this one open. Let me know, if you do for sure not plan to change it. Then we could close it.

I think let's close this as it's essentially a duplicate of #299

I think we can do something here, but unfortunately it won't be changed in the near future. I'm open to suggestions/a PR though :) I don't know how we'd get around the long-running operation though

closing as dupe of #299