capacitor-streaming-audio
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

capacitor-streaming-audio

This plugin implements PCM audio chunks playback specifically for elevenlabs websocket streaming. It makes it possible to seamlessly play Base64 PCM 44.1khz sample rate 16bit signed little endian audio data chunks in sequence. It uses AVQueuePlayer on IOS and Web Audio API for web/android.

Install

npm install capacitor-streaming-audio
npx cap sync

API

initStream()

initStream() => Promise<void>

stop()

stop() => Promise<void>

flushBuffer()

flushBuffer() => Promise<void>

playChunk(...)

playChunk(opts: { buffer: string; }) => Promise<void>
Param Type
opts { buffer: string; }

Readme

Keywords

Package Sidebar

Install

npm i capacitor-streaming-audio

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

41.5 kB

Total Files

27

Last publish

Collaborators

  • cybertrontechnologies