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; } |