Skip to content

Instantly share code, notes, and snippets.

@WoolDoughnut310
Created October 28, 2022 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WoolDoughnut310/82115c79d471f2bccee4f3de0ffd77de to your computer and use it in GitHub Desktop.
Save WoolDoughnut310/82115c79d471f2bccee4f3de0ffd77de to your computer and use it in GitHub Desktop.
import { Essentia, EssentiaWASM } from "essentia.js";
import fs from "fs";
import decode from "audio-decode";
import { isStream, streamToBuffer } from "../util";
const algorithms = {
Danceability: "danceability",
KeyExtractor: "key",
PercivalBpmEstimator: "bpm",
Intensity: "intensity",
Energy: "energy",
};
const essentia = new Essentia(EssentiaWASM);
const SCALE = ["C", "D", "E", "F", "G", "A", "B"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment