how to use sox in google cloud function

149 Views Asked by At

I trying to use openSMILE in google cloud functions, but I have a problem.

openSMILE seems to depend on the sox library. So I added sox to google cloud functions requirements.txt.

However, only the same log is being repeated.

"SoX could not be found!"

How can I fix this?

I use google cloud functions based on python3.7 runtime.

1

There are 1 best solutions below

1
On

If you check the sox py documentation you can see that it also:

Requires that SoX version 14.4.2 or higher is installed.

Which is basically a client that cannot be installed in a requirement.txt as a library. As you can see on this community answer, which is about npm, but also applies to py:

If you provide your own Linux-compiled binary, you may be able to execute it directly.

So you are going to have to get a compiled Sox Library, deploy it alongside your Cloud Function and start it every time the function is triggered.