capacitor-streaming-audio
v0.0.4
Published
This plugin implements PCM audio chunks playback specifically for elevenlabs websocket streaming. It makes it possible to seamlessly play Base64 PCM 24khz sample rate 16bit signed little endian audio data chunks in sequence. It uses AVQueuePlayer on IOS a
Downloads
10
Maintainers
Readme
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; } |