# @audio/resample-polyphase

> Polyphase FIR resampling — streaming-friendly rational rate conversion (48↔16/24 kHz voice-agent path)

Latest version **1.0.2** (published 2026-07-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @audio/resample-polyphase
pnpm add @audio/resample-polyphase
yarn add @audio/resample-polyphase
bun add @audio/resample-polyphase
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2026-07-11 |
| First published | 2026-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dmitry Iv. |
| Maintainers | jamen, dfcreative, dy |
| Keywords | audio, dsp, resample, sample-rate, polyphase |

## Links

- npm: https://www.npmjs.com/package/@audio/resample-polyphase
- Repository: https://github.com/audiojs/resample
- Homepage: https://github.com/audiojs/resample#readme
- Issues: https://github.com/audiojs/resample/issues
- Funding: https://github.com/sponsors/audiojs
- npm.io page: https://npm.io/package/@audio/resample-polyphase

## Recent versions

- 1.0.2 (latest) — 2026-07-11
- 1.0.1 — 2026-07-10
- 1.0.0 — 2026-07-08

## README

# @audio/resample-polyphase

> Polyphase FIR resampling — streaming-friendly rational rate conversion (48↔16/24 kHz voice-agent path)

Polyphase FIR rational resampling — upsample L, Kaiser-windowed sinc lowpass, downsample
M, computed directly from the phase decomposition (no zero stuffing). The streaming
variant carries filter history across chunks: chunked output is bit-identical to batch.

```js
import polyphase, { stream } from '@audio/resample-polyphase'

polyphase(data, { from: 44100, to: 48000 })   // → Float32Array

let s = stream({ from: 48000, to: 16000 })
s.write(chunk)   // → Float32Array
s.flush()        // → Float32Array (drains remaining history)
```

`polyphase(data: Float32Array, opts: {from, to}) → Float32Array` — sample rates in Hz.

`stream(opts: {from, to}) → {write(chunk) → Float32Array, flush() → Float32Array}`

Alias floor ≈−97 dB (15 kHz tone downsampled 44.1k → 22.05k).

## Install

```
npm i @audio/resample-polyphase
```

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