stojanovic / lambda-audio Goto Github PK
View Code? Open in Web Editor NEWRun Sound eXchange (SoX), the Swiss Army knife of audio manipulation, with Lame on AWS Lambda
License: GNU General Public License v2.0
Run Sound eXchange (SoX), the Swiss Army knife of audio manipulation, with Lame on AWS Lambda
License: GNU General Public License v2.0
This library was working fine before, but just today I started getting this error without any changes in my function:
/tmp/soxi: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory
I wonder if libgomp
was updated in the Amazon Linux AMI and the version of sox included in this lib is now outdated?
How are the sox files being compiled and included in this project? Does this work on amazon Linux 1 and 2?
After installing lambda-audio via
npm install lambda-audio --save
I uploaded the lambda function via ZIP upload into my LambdaFunction. When trying to run this command
lambdaAudio.sox('./existingfile.mp3')
.then(response => {
console.log("sox response: "+response); // Do something with the info
})
.catch(errorResponse => {
console.log('Error from the sox command:', errorResponse)
})
I get the following error in my CloudWatch Log console.
Error from the sox command: { Error: spawn EACCES
at _errnoException (util.js:1022:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at Object.exports.spawn (child_process.js:502:9)
at Promise (/var/task/node_modules/lambda-audio/lib/spawn.js:7:34)
at new Promise (<anonymous>)
at spawnPromise (/var/task/node_modules/lambda-audio/lib/spawn.js:6:10)
at invokeCommand (/var/task/node_modules/lambda-audio/lib/lambda-audio.js:9:12)
at Object.sox (/var/task/node_modules/lambda-audio/lib/lambda-audio.js:17:10)
at Object.LaunchRequest (/var/task/index.js:166:25)
at emitNone (events.js:106:13) code: 'EACCES', errno: 'EACCES', syscall: 'spawn' }
Does anybody know whats wrong? How can I fix it?
Hello,
I think I will need your help with my issue. I'm using serverless framework and have lambda function that downloads mp3 file from a bucket, then saves it in /tmp/input.mp3
Next I'm executing code:
import lambdaAudio from 'lambda-audio'
const doAudioMagic = () => {
console.log('executing soxi')
lambdaAudio.soxi('/tmp/input.mp3')
.then(response => {
// Do something with the info
console.log(response)
})
.catch(errorResponse => {
console.log('Error from the soxi command:', errorResponse)
})
}
And I get following error:
Error: spawn /tmp/soxi ENOENT
at exports._errnoException (util.js:1018:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
So the soxi file is not present the the path, but why? How should I "install" lambda-audio so the file is properly copied to the /tmp/ path?
Hi,
Thank you so much for this solution.
How did you create the executable from the SoX source code? We are thinking to use this process for silence the part of the audio file? Are you still using this process? What is your thought on AWS Lambda vs AWS EC2 instance to run this process?
I have installed "lambda-audio": "^1.0.0", (Node version is: v8.11.3)
While calling lambdaAudio.lame('-b 48 ./tmp/bbb.mp3 ./tmp/aaa.mp3')
I got below error.
Error from the lame command: /g/node_modules/lambda-audio/bin/lame: /g/node_modules/lambda-audio/bin/lame: cannot execute binary file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.