{"id":17437351,"url":"https://github.com/blixt/js-lameworker","last_synced_at":"2026-02-21T18:31:26.335Z","repository":{"id":34179746,"uuid":"38029911","full_name":"blixt/js-lameworker","owner":"blixt","description":"Easy to use LAME bindings via a Web Worker.","archived":false,"fork":false,"pushed_at":"2015-10-06T21:48:17.000Z","size":943,"stargazers_count":19,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-24T07:17:41.969Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://blixt.nyc/js-lameworker/example.html","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blixt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-25T05:31:37.000Z","updated_at":"2018-06-01T21:32:17.000Z","dependencies_parsed_at":"2022-09-04T01:21:03.790Z","dependency_job_id":null,"html_url":"https://github.com/blixt/js-lameworker","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/blixt/js-lameworker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blixt%2Fjs-lameworker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blixt%2Fjs-lameworker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blixt%2Fjs-lameworker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blixt%2Fjs-lameworker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blixt","download_url":"https://codeload.github.com/blixt/js-lameworker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blixt%2Fjs-lameworker/sbom","scorecard":{"id":243557,"data":{"date":"2025-08-11","repo":{"name":"github.com/blixt/js-lameworker","commit":"dd21801f0ea2ce0c8e74d541e04359bf5534e996"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T07:05:03.416Z","repository_id":34179746,"created_at":"2025-08-17T07:05:03.416Z","updated_at":"2025-08-17T07:05:03.416Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29689965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T18:18:25.093Z","status":"ssl_error","status_checked_at":"2026-02-21T18:18:22.435Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-17T11:48:21.947Z","updated_at":"2026-02-21T18:31:26.296Z","avatar_url":"https://github.com/blixt.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"LAME worker\n===========\n\nPackage for running LAME in a Web Worker. LAME makes it easy to encode and decode MP3 files. See [`example.html`](http://blixt.nyc/js-lameworker/example.html) for an example that records audio from the microphone and encodes it as MP3 in real-time, then lets the user download it.\n\n\nExample\n-------\n\nUsing this library is very simple. Assuming you have an HTML file with `lame.js` and `lame.worker.js` in the same directory, you can do the following:\n\n```html\n\u003cscript src=\"lame.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\nvar lame = lameworker();\nlame.getVersion(function (error, version) {\n  console.log('Using LAME v' + version);\n});\n\u003c/script\u003e\n```\n\nSee `dist/example.html` for a full example.\n\n\n### Using with Browserify etc.\n\nIf you're using a toolchain that simulates a CommonJS environment, you can import this package instead of using the global from `dist/lame.js`:\n\n```javascript\nvar lameworker = require('lameworker');\n\n// Note that you still need to refer to a stand-alone worker file.\nvar lame = lameworker('/static/lame.worker.js');\n\nlame.getVersion(function (error, version) {\n  console.log('Using LAME v' + version);\n});\n```\n\nYou can find the stand-alone worker file as `dist/lame.worker.js` in this package.\n\n\n### Encoding microphone data in real time\n\nSending microphone data to LAME is pretty straightforward. (To see this in action, check out [the example page](http://blixt.nyc/js-lameworker/example.html).)\n\n#### Initializing LAME\n\n```javascript\n// init gets a global handle to refer to a single encoding session.\nlame.init(function (error, handle) {\n  // Set up LAME parameters.\n  // These are all asynchronous but order is guaranteed.\n  lame.setMode(handle, lameworker.MONO);\n  lame.setNumChannels(handle, 1);\n  lame.setInSampleRate(handle, 44100);\n  lame.setOutSampleRate(handle, 44100);\n  lame.setBitrate(handle, 128);\n  // initParams prepares the session for encoding with above parameters.\n  lame.initParams(handle);\n});\n```\n\n#### Encoding the microphone data\n\n```javascript\n// Keep a list of ArrayBuffer instances coming in from LAME.\nvar buffers = [];\n// Let's pretend we're listening for audio data from a Web Audio API script processor.\nprocessor.onaudioprocess = function (event) {\n  // Send microphone data to LAME for MP3 encoding while recording.\n  var array = event.inputBuffer.getChannelData(0);\n  lame.encodeBuffer(handle, array, array, function (error, buffer) {\n    // buffer is an ArrayBuffer containing MP3 data.\n    buffers.push(buffer);\n  });\n};\n```\n\n#### Closing the LAME session and getting an MP3 blob\n\n```javascript\n// When done, get the remaining data and close the LAME session.\nlame.encodeFlush(handle, function (error, buffer) {\n  buffers.push(buffer);\n  // The Blob interface automatically concatenates all the buffers into a single MP3 binary.\n  var blob = new Blob(buffers, {type: 'audio/mp3'});\n  // Do something with blob here...\n});\n// Clean up the LAME session.\nlame.close(handle);\n```\n\n\nTODO\n----\n\nThere are some obvious improvements to be done still:\n\n1. Keep buffers within the Web Worker and only send back a `Blob` instance once the encoding is complete\n2. Simpler API with a helper on the main thread side to make encoding MP3 just a couple of API calls\n3. When the main thread sends data to the Web Worker, transfer the buffer instead of cloning it\n4. More? Please add issues to this repository!\n\n\nBuilding\n--------\n\nMake sure you have Emscripten set up on your system, then run `make`.\n\n*Note*: For the worker file to work properly, you may need Emscripten including this pull request: https://github.com/kripken/emscripten/pull/3577\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblixt%2Fjs-lameworker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblixt%2Fjs-lameworker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblixt%2Fjs-lameworker/lists"}