/** * @license * Copyright 2024 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT * * Re-encodes any browser-recorded audio blob to OGG Opus at 32 kbps. * Falls back to the original blob unchanged on browsers that do not support * OGG Opus MediaRecorder recording (e.g. Safari). * * Pipeline: * input blob → AudioContext.decodeAudioData → BufferSource → MediaStreamDestination * → MediaRecorder(ogg/opus, 32 kbps) → output blob */ export interface CompressResult { blob: Blob; mimeType: string; ext: string; } /** Returns true if the current browser can record OGG Opus via MediaRecorder (Chrome/Firefox). */ export declare function canEncodeOgg(): boolean; /** * Re-encodes `inputBlob` to OGG Opus at 32 kbps. * If the browser does not support OGG Opus recording (Safari), returns the original blob unchanged. */ export declare function compressToOpus(inputBlob: Blob, originalMime: string): Promise; //# sourceMappingURL=audio-compress.d.ts.map