{"_id":"@audio/loudness-sounds","_rev":"4-c917f431d0a4e30eb45c904e2cfeb091","name":"@audio/loudness-sounds","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@audio/loudness-sounds","version":"1.0.0","keywords":["audio","dsp","loudness","sounds","labeling"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/loudness-sounds@1.0.0","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"homepage":"https://github.com/audiojs/loudness/tree/main/packages/loudness-sounds","bugs":{"url":"https://github.com/audiojs/loudness/issues"},"dist":{"shasum":"3abcb1681aa111cd9b201f23717a1b1641c056a9","tarball":"https://registry.npmjs.org/@audio/loudness-sounds/-/loudness-sounds-1.0.0.tgz","fileCount":3,"integrity":"sha512-81mZLkKsaXEOv4lyrD/5welOBDs+IoW/sW28B/FzQd/Tn0E/jqQBFvestYSQuO5Agi4+6CvzuBIylvDSjRodHw==","signatures":[{"sig":"MEUCIDisJmSoJj55JO4Mp2GvMqWXNW0P6cnda2vxQP+sdCubAiEAgxdZN/UMoDGBy6l/PN1TN0DNU5dsYegm+wanOVvy26s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4726},"main":"sounds.js","type":"module","audio":"./audio.js","engines":{"node":">=18"},"exports":{".":"./sounds.js","./audio":"./audio.js","./package.json":"./package.json"},"gitHead":"158a5506cc97179e6c26624e123eb3477ef0c4fc","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/loudness.git","type":"git","directory":"packages/loudness-sounds"},"_npmVersion":"11.12.1","description":"Sound labeling — level-threshold region detection (Audacity Label Sounds)","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/loudness-sounds_1.0.0_1783694026537_0.49037354805213207","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/loudness-sounds","version":"1.0.1","keywords":["audio","dsp","loudness","sounds","labeling"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/loudness-sounds@1.0.1","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"homepage":"https://github.com/audiojs/loudness/tree/main/packages/loudness-sounds","bugs":{"url":"https://github.com/audiojs/loudness/issues"},"dist":{"shasum":"3d680e5176f48d7b0b630045fbbfbc39ed67bc67","tarball":"https://registry.npmjs.org/@audio/loudness-sounds/-/loudness-sounds-1.0.1.tgz","fileCount":4,"integrity":"sha512-rmb5orY/dBmaZzwSF5LABYyLC5QmHRhBMNbeWAAzX4ua5dxT+W2+XVoZUWBAcUfFRSEiiAc2+ltpMqificMiLw==","signatures":[{"sig":"MEQCICcLbKfTrdR7eRW4rEeyf4OZo+JUTqVS3Y3A8S3NnM7qAiBpyKnYHioYs2e3+JnVm/I6xT0PBHSjjHQz8ilCEEXgMg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5803},"main":"sounds.js","type":"module","audio":"./audio.js","engines":{"node":">=18"},"exports":{".":"./sounds.js","./audio":{"types":"./audio.d.ts","default":"./audio.js"},"./package.json":"./package.json"},"gitHead":"5e020a9f267b93903da1a1f8bf3060637e35ad95","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/loudness.git","type":"git","directory":"packages/loudness-sounds"},"_npmVersion":"11.12.1","description":"Sound labeling — level-threshold region detection (Audacity Label Sounds)","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/loudness-sounds_1.0.1_1783701747510_0.16161656871762697","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@audio/loudness-sounds","version":"1.0.2","keywords":["audio","dsp","loudness","sounds","labeling"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/loudness-sounds@1.0.2","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"homepage":"https://github.com/audiojs/loudness/tree/main/packages/loudness-sounds","bugs":{"url":"https://github.com/audiojs/loudness/issues"},"dist":{"shasum":"296a28a44e002b9c170030ef9b241ae5f280cc29","tarball":"https://registry.npmjs.org/@audio/loudness-sounds/-/loudness-sounds-1.0.2.tgz","fileCount":6,"integrity":"sha512-BsFE7tnB/E4w4WeA7B5jRJh6/42qUtt9UZIyVE17R75uFeH0x26kR8J7aZjlGALNDKaYpH1CxkLXKnpRjaL1Dw==","signatures":[{"sig":"MEYCIQD5Cfvp/JqSVxIMmAb3kFzxFUmUI7CipHbzoh7cwIHCdgIhAMGbGpllGJN6tY0dIUJS0p2RAnIzAUza49997xOqsBK0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9566},"main":"sounds.js","type":"module","audio":"./audio.js","types":"index.d.ts","engines":{"node":">=18"},"exports":{".":"./sounds.js","./audio":{"types":"./audio.d.ts","default":"./audio.js"},"./package.json":"./package.json"},"funding":"https://github.com/sponsors/audiojs","gitHead":"54e53fc3ef0ffbcb2c428053a323bef99715a825","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/loudness.git","type":"git","directory":"packages/loudness-sounds"},"_npmVersion":"11.12.1","description":"Sound labeling — level-threshold region detection (Audacity Label Sounds)","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/loudness-sounds_1.0.2_1783731630742_0.8895632912236959","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@audio/loudness-sounds","version":"1.0.3","description":"Sound labeling — level-threshold region detection (Audacity Label Sounds)","type":"module","sideEffects":false,"main":"sounds.js","exports":{".":{"types":"./index.d.ts","default":"./sounds.js"},"./audio":{"types":"./audio.d.ts","default":"./audio.js"},"./package.json":"./package.json"},"types":"index.d.ts","keywords":["audio","dsp","loudness","sounds","labeling"],"license":"MIT","author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/audiojs/loudness.git","directory":"packages/loudness-sounds"},"homepage":"https://github.com/audiojs/loudness/tree/main/packages/loudness-sounds","bugs":{"url":"https://github.com/audiojs/loudness/issues"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"audio":"./audio.js","funding":"https://github.com/sponsors/audiojs","gitHead":"095c2c3d8c55523252e4ac64a90aa98ee3616bfe","_id":"@audio/loudness-sounds@1.0.3","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-fk7FuJoYbiX2rwapntnBQbqFBGC2FTU7T0kn3LS1/wnQEJVnTNWdeMScVoo4m//AaTfsxf4gSkIY0NKoLiEHlg==","shasum":"01f0fe01bc5d1f81990edd3048b8c56c58d2b63a","tarball":"https://registry.npmjs.org/@audio/loudness-sounds/-/loudness-sounds-1.0.3.tgz","fileCount":6,"unpackedSize":9622,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCX7rwY5jHcXdI1tnelb409BtEqsMzU8JtVgOJ1i6UoWgIhAOY23GuLAEur6ezcyhr3tawS25/iPIs9etUPbkA+s46M"}]},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"directories":{},"maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/loudness-sounds_1.0.3_1787019266634_0.17606076651176017"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-10T14:33:46.383Z","modified":"2026-08-18T02:14:26.985Z","1.0.0":"2026-07-10T14:33:46.653Z","1.0.1":"2026-07-10T16:42:27.659Z","1.0.2":"2026-07-11T01:00:30.882Z","1.0.3":"2026-08-18T02:14:26.779Z"},"bugs":{"url":"https://github.com/audiojs/loudness/issues"},"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","homepage":"https://github.com/audiojs/loudness/tree/main/packages/loudness-sounds","keywords":["audio","dsp","loudness","sounds","labeling"],"repository":{"type":"git","url":"git+https://github.com/audiojs/loudness.git","directory":"packages/loudness-sounds"},"description":"Sound labeling — level-threshold region detection (Audacity Label Sounds)","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/loudness-sounds [![npm](https://img.shields.io/npm/v/@audio/loudness-sounds)](https://www.npmjs.com/package/@audio/loudness-sounds) [![MIT](https://img.shields.io/badge/MIT-%E0%A5%90-white)](https://github.com/krishnized/license)\n\nSound labeling — level-threshold region detection (Audacity Label Sounds)\n\n```\nnpm install @audio/loudness-sounds\n```\n\n```js\nimport sounds from '@audio/loudness-sounds'\n```\n\nRegion detector modeled on Audacity's [Label Sounds](https://manual.audacityteam.org/man/label_sounds.html) analyzer — not a loudness metric, but a level-threshold segmenter that ships in this family for the same input pipeline. 10 ms chunks are classed sound/silence against a level `threshold`, adjacent sound regions closer than `minSilence` are merged, regions shorter than `minSound` are folded into the next, and each surviving region is padded (`pre`/`post`) into its neighboring silence — never past a neighboring *sound* boundary, per the manual: \"labels can overlap other labels, but cannot overlap previous or following sounds.\"\n\n```js\nsounds(channels, { threshold: -30, minSilence: 1, minSound: 1 })\n```\n\n| Param | Default | |\n|---|---|---|\n| `fs` | `48000` | Sample rate, Hz |\n| `threshold` | `-30` | dB level splitting sound from silence |\n| `measurement` | `'peak'` | `'peak'` (max \\|x\\|, most sensitive — catches low-duty-cycle transients), `'avg'` (mean \\|x\\|), or `'rms'` (sqrt mean x²) |\n| `minSilence` | `1` | Silence gaps shorter than this (seconds) are closed, merging the regions either side |\n| `minSound` | `1` | Regions shorter than this (seconds) are folded into the following region |\n| `pre` | `0` | Seconds to pad each region's start into leading silence |\n| `post` | `0` | Seconds to pad each region's end into trailing silence |\n| `max` | `10000` | Maximum number of regions returned |\n\nAccepts `Float32Array` (mono) or `Float32Array[]` (multichannel — chunk level is computed across all channels together). Returns an array of `{ at, duration, label }` (label = `'Sound N'`), ordered by position.\n\n**Use when:** auto-splitting a long recording into per-take/per-phrase regions, silence trimming, or generating label tracks for editors.\n\nModeled on Audacity's Label Sounds analyzer; a level-threshold segmenter, not an ITU-R/EBU loudness measurement.\n\n---\n\nPart of [@audio/loudness](https://github.com/audiojs/loudness) — the loudness family umbrella. Documented from the reference implementation.\n\nMIT © [audiojs](https://github.com/audiojs)\n","readmeFilename":"README.md"}