# sound-detector

> Sound Detector

Latest version **0.0.7** (published 2018-09-19) · MPL 2.0 license · 0 weekly downloads

## Install

```sh
npm install sound-detector
pnpm add sound-detector
yarn add sound-detector
bun add sound-detector
```

Provides the command `sounddetector`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2018-09-19 |
| First published | 2018-09-17 |
| Weekly downloads | 0 |
| License | MPL 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 714.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | meikidd |
| Maintainers | meikidd |

## Links

- npm: https://www.npmjs.com/package/sound-detector
- Repository: https://git.garena.com/sparktv/sound-detector
- npm.io page: https://npm.io/package/sound-detector

## Dependencies (2)

- [dsp.js](https://npm.io/package/dsp.js.md) ^1.0.1
- [commander](https://npm.io/package/commander.md) ^2.18.0

## Recent versions

- 0.0.7 (latest) — 2018-09-19
- 0.0.6 — 2018-09-19
- 0.0.5 — 2018-09-18
- 0.0.4 — 2018-09-18
- 0.0.3 — 2018-09-18
- 0.0.2 — 2018-09-17
- 0.0.1 — 2018-09-17

## README

# Sound Detector

## Installation

```
npm install -g sound-detector
```

## Usage

### Command line

```bash
# read from a file
sounddetector -p {example.mp3}

# read from input stream
sounddetector -s < cat {example.mp3}

# skip the ffmpeg convert
sounddetector -p {example.mp3} --no-ffmpeg
```

### Node.js

```js
const path = require('path');
const soundDetector = require('sound-detector');

const filepath = './example.mp3'; // path to your video/audio
const soundType = 'gunfire';
soundDetector({
  type: soundType,
  path: path.resolve(filepath)
}).then(timestamps => {
  process.stdout.write(JSON.stringify(timestamps));
});
```

---
_Source: https://npm.io/package/sound-detector · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
