UNPKG

js-tts-wrapper

Version:

A JavaScript/TypeScript library that provides a unified API for working with multiple cloud-based Text-to-Speech (TTS) services

12 lines (11 loc) 365 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.base64ToUint8Array = base64ToUint8Array; function base64ToUint8Array(b64) { const binaryStr = atob(b64); const bytes = new Uint8Array(binaryStr.length); for (let i = 0; i < binaryStr.length; i++) { bytes[i] = binaryStr.charCodeAt(i); } return bytes; }