the-audio-util

1.0.6 • Public • Published

the-audio-util

Build Status npm Version JS Standard

Utility for audio

Installation

$ npm install the-audio-util --save

Usage

'use strict'

const {rmsFor} = require('the-audio-util')

async function tryExample () {
  class SpeechAudioProcessor extends AudioWorkletProcessor {

    process (inputs, outputs) {
      const input = inputs[0]
      const output = outputs[0]
      for (let channel = 0; channel < output.length; ++channel) {
        output[channel].set(input[channel])
        {
          const rms = rmsFor(input[channel])
          this.port.postMessage({rms})
        }
      }

      return true
    }
  }
}

tryExample().catch((err) => console.error(err))

API Guide

License

This software is released under the MIT License.

Links

Readme

Keywords

Package Sidebar

Install

npm i the-audio-util

Weekly Downloads

2

Version

1.0.6

License

MIT

Unpacked Size

41.9 kB

Total Files

40

Last publish

Collaborators

  • okunishinishi