UNPKG

voice-stream

Version:

A powerful React hook for real-time voice streaming, designed for AI-powered applications. Perfect for real-time transcription, voice assistants, and audio processing with features like silence detection and configurable audio processing.

9 lines (8 loc) 252 B
export var int16ArrayToBase64 = function (buffer) { var binary = ""; var bytes = new Uint8Array(buffer.buffer); for (var i = 0; i < bytes.byteLength; i++) { binary += String.fromCharCode(bytes[i]); } return btoa(binary); };