Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help: Running from a firebase cloud function #182

Open
Toolenaar opened this issue Dec 23, 2022 · 3 comments
Open

Help: Running from a firebase cloud function #182

Toolenaar opened this issue Dec 23, 2022 · 3 comments

Comments

@Toolenaar
Copy link

Hi I would like to run this from a firebase cloud function (node), where it fetches an audiofile from a storage bucket and generates the waveform data. But I have no clue where to start, would this even be possible ? Can anyone nudge me into the right direction? Any help is really appriciated

@chrisn
Copy link
Member

chrisn commented Dec 23, 2022

I don't know anything about Firebase, but the general steps would be:

  1. Install audiowaveform (e.g, as described in https://github.com/bbc/audiowaveform#installation). If this is anything like AWS Lambda, though, you'll need to compile and upload a statically linked build of audiowaveform suitable for whatever OS Firebase uses, together with your Node.js code
  2. Write a Node script to fetch the audio file, run it through audiowaveform, then store the waveform data somewhere, presumably to another storage bucket

@JacobJaffe
Copy link

@Toolenaar Have you had any success with this? I'm looking into doing something similar.

From what I can tell, Firebase Functions have a defined set of system packages that will be installed, that can't be changed: https://cloud.google.com/functions/docs/reference/system-packages

I'm thinking of setting up a micro service with the more flexible Cloud Run, which could have access to storage / be called from a function: https://cloud.google.com/workflows/docs/run/tutorial-cloud-run

@clawvyrin
Copy link

Hey 👋, has any of you found a way to do it ? Would like to do the same but i'm kinda stuck

@bbc bbc deleted a comment from sockite Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants