@silyze/async-audio-format-webm
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Async Audio Format WebM

Prebuilt WebM/Opus audio format for use with @silyze/async-audio-stream, powered by FFmpeg.

This package wraps @silyze/async-audio-ffmpeg and provides a ready-to-use AudioFormat for WebM/Opus encoding and decoding.


Install

npm install @silyze/async-audio-format-webm

Requires FFmpeg to be installed and available in your system PATH.


Usage

import { OpusFormat } from "@silyze/async-audio-format-webm";

// Create an instance for 8 kHz PCM audio
const format = new OpusFormat(8000);

console.log(format.name); // "webm-opus"
console.log(format.pcmSampleRate); // 8000

You can use this format directly with any system based on @silyze/async-audio-stream.


Available Formats

OpusFormat

WebM container with Opus audio codec.
Defaults to 24kbps mono output.

export const OpusFormat: new (sampleRate: number) => AudioFormat;

Readme

Keywords

none

Package Sidebar

Install

npm i @silyze/async-audio-format-webm

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

39.4 kB

Total Files

13

Last publish

Collaborators

  • simeonmarkoski
  • mojsoski