Comments (7)
Here you can find some minimal node examples: Essentia benchmarks . Hope it helps!
from essentia.js.
@jakiestfu You need to decode the mp3 file buffer into audio data. See some node.js examples with wav files here.
You might need to use external libraries to decode mp3 file (eg: https://github.com/audiojs/audio-decode)
from essentia.js.
+1 -- I was also looking for a way to include the TS types in a Node project.
from essentia.js.
I've been having a hard time getting this to run in a node environment.
const url = 'https://site.com/song.mp3'
const buffer = await fetch(url)
.then((r) => r.arrayBuffer())
.then(Buffer.from)
const results = await essentia.KeyExtractor(essentia.arrayToVector(buffer))
This yields the wrong key always. What is the recommended approach to providing the expected data to the API, @sonoalex @albincorreya ?
from essentia.js.
Fantastic, @albincorreya Thank you for that reference. Does essentia only support wav
containers or are other formats supported as well?
from essentia.js.
@albincorreya Would you expect for this to be a correct implementation for a remote resource? I'm still getting incorrect keys and scales for MP3 audio.
import decodeAudio from 'audio-decode'
import fetch from 'node-fetch'
const main = async () => {
const url = 'https://site.com/song.mp3'
const buffer = await fetch(url).then((r) => r.arrayBuffer())
const decodedAudio = await decodeAudio(buffer)
const vector = essentia.arrayToVector(decodedAudio._data)
const { key, scale, strength } = await essentia.KeyExtractor(vector)
}
main()
from essentia.js.
For completion, there are also some examples for Node.js here. https://github.com/MTG/essentia.js-benchmarks/tree/master/node/benchmark
Back to the OP question. I also can't seem to get the KeyExtractor to give me the right key using a WAV or MP3 (node-lame). Based on what some online key detectors say anyway.
from essentia.js.
Related Issues (20)
- Using deep learning models with Essentia.js and Tensorflow.js HOT 1
- Tensor must have a shape comprised of positive integers but got shape [,96]
- Real-time mood classification - "most" vs "least" danceable part of a track HOT 1
- Error 404 when accessing the source code from the demos HOT 1
- Build errors trying to build onsets demo
- Real-time analysis.
- JS bindings for SBic
- GapsDetector not returning timestamp of anomaly in NodeJS
- RuntimeError: abort(TypeError: Failed to parse URL from asturiasfine.mp3). Build with -s ASSERTIONS=1 for more info. at process.abort (C:\Users\Rosanna\Desktop\node_modules\essentia.js\dist\essentia-wasm.umd.js:19:12157)
- Is this up-to-date? HOT 3
- Can't import Essentia
- Get sections/markers info (intro, verse, chorus etc) from an audio HOT 1
- FrameGenerator should provide access to other FrameCutter parameters
- I would like to request the implementation of SBic.
- Beginner documentation improvements HOT 1
- How to import ML models ad use for autotagging HOT 1
- VectorFloat params incorrectly converted on Typescript before passed to WASM
- Float params accept JS string containing numeric characters
- Webpack: error for missing modules in WASM version HOT 1
- Can essentia js be used in typescript for the web?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from essentia.js.