{"_id":"@audio/resample-polyphase","_rev":"4-4edd7cac0b47fede5eac966fa25e952c","name":"@audio/resample-polyphase","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@audio/resample-polyphase","version":"1.0.0","keywords":["audio","dsp","resample","sample-rate","polyphase"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/resample-polyphase@1.0.0","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"dist":{"shasum":"b414c03d2d9867b1a76de3534bd11145cc74cc1e","tarball":"https://registry.npmjs.org/@audio/resample-polyphase/-/resample-polyphase-1.0.0.tgz","fileCount":3,"integrity":"sha512-1oBjxVQNf51/EE6JNL8LYeFACf1GWdLrGmEDbm1QkNl6Zmd46oM6ecd7mOKW4JPYbMa3NeZEva37jkmi+dLu8A==","signatures":[{"sig":"MEUCIGf7xX2VCMP/k5xEFpp32eiRXA2h8zwypetWAUKG1iVNAiEAlDBJUE0yMUgfMavwju1zXKWovzySCHo8UqGrwXd6+NU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4694},"main":"polyphase.js","type":"module","engines":{"node":">=18"},"exports":{".":"./polyphase.js","./package.json":"./package.json"},"gitHead":"59804a2a2b3584e28ec6f52b2faf2840df5452dd","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"_npmVersion":"11.12.1","description":"Polyphase FIR resampling — streaming-friendly rational rate conversion (48↔16/24 kHz voice-agent path)","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/resample-polyphase_1.0.0_1783548314900_0.146516203442018","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/resample-polyphase","version":"1.0.1","keywords":["audio","dsp","resample","sample-rate","polyphase"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/resample-polyphase@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/resample#readme","bugs":{"url":"https://github.com/audiojs/resample/issues"},"dist":{"shasum":"0d58e329b177ba4758e785ee9016eccb11c7bd49","tarball":"https://registry.npmjs.org/@audio/resample-polyphase/-/resample-polyphase-1.0.1.tgz","fileCount":3,"integrity":"sha512-NvzofffDOis36ChdHftKl9l/jubVaekGPZmn7nymEva6/VoXfOYUkX74oyfFCJbBfSPC6wUu72RNZuVuxtVr/g==","signatures":[{"sig":"MEYCIQDIOT6e3cj2WbU7HREdUtpeAZ60jaDkbPxU/Y0ZSmEJ6gIhAJirrXdjfgOEkQFJ5wj96hRpt+1wHE1LFaJ/29tfCqG3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5612},"main":"polyphase.js","type":"module","engines":{"node":">=18"},"exports":{".":"./polyphase.js","./package.json":"./package.json"},"gitHead":"bbd28634c0cb7123c05e3b2c34af2fbbe5bcb8a1","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/resample.git","type":"git","directory":"packages/resample-polyphase"},"_npmVersion":"11.12.1","description":"Polyphase FIR resampling — streaming-friendly rational rate conversion (48↔16/24 kHz voice-agent path)","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/resample-polyphase_1.0.1_1783726320536_0.37422685905834907","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@audio/resample-polyphase","version":"1.0.2","keywords":["audio","dsp","resample","sample-rate","polyphase"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/resample-polyphase@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/resample#readme","bugs":{"url":"https://github.com/audiojs/resample/issues"},"dist":{"shasum":"cd3a154317396b6406de0801cf9e1a5d801b7bce","tarball":"https://registry.npmjs.org/@audio/resample-polyphase/-/resample-polyphase-1.0.2.tgz","fileCount":4,"integrity":"sha512-9QAFe/g0kTlprzUVZFyh37vxWeeyOW40tXPlHfbL3p1hN3WPZiaauAUwsoXUiEl9mlbtqYfM47EoN7SsZfQhTg==","signatures":[{"sig":"MEYCIQD83Vj4XC2oz/2WryQFWeazWrvaCYdpzpT7VeAA+afTQAIhAL0TzHgS9eLeqfByiSveKD4Zb2ayPpqCgmo7YhpYihVq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6513},"main":"polyphase.js","type":"module","types":"index.d.ts","engines":{"node":">=18"},"exports":{".":"./polyphase.js","./package.json":"./package.json"},"funding":"https://github.com/sponsors/audiojs","gitHead":"350010090f96dc13817b34da13c64cd4c129c411","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/resample.git","type":"git","directory":"packages/resample-polyphase"},"_npmVersion":"11.12.1","description":"Polyphase FIR resampling — streaming-friendly rational rate conversion (48↔16/24 kHz voice-agent path)","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/resample-polyphase_1.0.2_1783731728405_0.508856226210284","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"_id":"@audio/resample-polyphase@1.1.0","bugs":{"url":"https://github.com/audiojs/resample/issues"},"dist":{"shasum":"bd0d6437c518613c65ca032db4349032161b7fdc","tarball":"https://registry.npmjs.org/@audio/resample-polyphase/-/resample-polyphase-1.1.0.tgz","fileCount":4,"integrity":"sha512-mSPyTABEzAcF+/kI2gys0+tI9GCJsYQ81tVpzY81rvLCHbop2HVFsbJLVRHHXD8mTGX9c27ggkthF+QnnHLqSA==","signatures":[{"sig":"MEUCIBX9ZDl0E7d3fbxUgdv+tyBI3GS/DS04QI/2BJ/E9duEAiEA97ce9wf+eduTSuNlIcNZ2vFt9fCMBtmzTa9aVQaNEcs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHVRm5uadnkuI2LN5HMokzTyz0doiGzmnVM62UgdhpteAiAWvFrcRTwVulSsfGuJLD7i5n1OUr7jYJM/rmBy6EloMQ=="}],"unpackedSize":7366},"main":"polyphase.js","name":"@audio/resample-polyphase","type":"module","types":"index.d.ts","author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","default":"./polyphase.js"},"./package.json":"./package.json"},"funding":"https://github.com/sponsors/audiojs","gitHead":"6d7cb3ba7ca589567e34cb5cb576724fe91e759a","license":"MIT","version":"1.1.0","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"homepage":"https://github.com/audiojs/resample#readme","keywords":["audio","dsp","resample","sample-rate","polyphase"],"repository":{"url":"git+https://github.com/audiojs/resample.git","type":"git","directory":"packages/resample-polyphase"},"_npmVersion":"11.12.1","description":"Polyphase FIR resampling — streaming-friendly rational rate conversion (48↔16/24 kHz voice-agent path)","directories":{},"maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/resample-polyphase_1.1.0_1790520810481_0.6552871617440259"}}},"time":{"created":"2026-07-08T22:05:14.769Z","modified":"2026-09-27T14:53:30.757Z","1.0.0":"2026-07-08T22:05:15.036Z","1.0.1":"2026-07-10T23:32:00.682Z","1.0.2":"2026-07-11T01:02:08.543Z","1.1.0":"2026-09-27T14:53:30.573Z"},"bugs":{"url":"https://github.com/audiojs/resample/issues"},"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","homepage":"https://github.com/audiojs/resample#readme","keywords":["audio","dsp","resample","sample-rate","polyphase"],"repository":{"url":"git+https://github.com/audiojs/resample.git","type":"git","directory":"packages/resample-polyphase"},"description":"Polyphase FIR resampling — streaming-friendly rational rate conversion (48↔16/24 kHz voice-agent path)","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/resample-polyphase\n\n> Polyphase FIR resampling — streaming-friendly rational rate conversion (48↔16/24 kHz voice-agent path)\n\nPolyphase FIR rational resampling — upsample L, Kaiser-windowed sinc lowpass, downsample\nM, computed directly from the phase decomposition (no zero stuffing). The streaming\nvariant carries filter history across chunks: chunked output is bit-identical to batch.\n\n```js\nimport polyphase, { stream } from '@audio/resample-polyphase'\n\npolyphase(data, { from: 44100, to: 48000 })   // → Float32Array\n\nlet s = stream({ from: 48000, to: 16000 })\ns.write(chunk)   // → Float32Array\ns.flush()        // → Float32Array (drains remaining history)\n```\n\n`polyphase(data: Float32Array, opts: {from, to}) → Float32Array` — sample rates in Hz.\n\n`stream(opts: {from, to}) → {write(chunk) → Float32Array, flush() → Float32Array}`\n\nTaps per phase widen with the ratio on downsample (32 at 44.1k → 48k, 64 at 2:1, 96 at 3:1), so every ratio has the\nsame response: flat within 0.001 dB to 0.8 of the lower Nyquist (−0.34 dB at 0.9), no delay, alias floor −93 dB\nfrom 1.36× Nyquist up (swept, 44.1k → 22.05k and 48k → 16k).\n\n## Install\n\n```\nnpm i @audio/resample-polyphase\n```\n","readmeFilename":"README.md"}