react-voice-recorder-pro
Version:
A powerful React hook-based voice recording library with real-time audio visualization and comprehensive browser support
58 lines • 1.54 kB
TypeScript
import { AudioFormat } from '../types';
/**
* Check audio formats supported by browser
*/
export declare function getSupportedAudioFormats(): AudioFormat[];
/**
* Select optimal audio format
*/
export declare function getBestAudioFormat(): string;
/**
* Download Blob
*/
export declare function downloadBlob(blob: Blob, filename?: string): void;
/**
* Convert Blob to Base64 string
*/
export declare function blobToBase64(blob: Blob): Promise<string>;
/**
* Convert Base64 string to Blob
*/
export declare function base64ToBlob(base64: string, mimeType?: string): Blob;
/**
* Format file size in human-readable form
*/
export declare function formatFileSize(bytes: number): string;
/**
* Format time in human-readable form
*/
export declare function formatDuration(seconds: number): string;
/**
* Convert audio level for visualization
*/
export declare function normalizeAudioLevel(level: number, minLevel?: number): number;
/**
* Check if browser supports MediaRecorder
*/
export declare function isMediaRecorderSupported(): boolean;
/**
* Check if browser supports getUserMedia
*/
export declare function isGetUserMediaSupported(): boolean;
/**
* Check if browser supports Web Audio API
*/
export declare function isWebAudioSupported(): boolean;
/**
* Get device information
*/
export declare function getDeviceInfo(): {
userAgent: string;
isMobile: boolean;
isIOS: boolean;
isAndroid: boolean;
isSafari: boolean;
isChrome: boolean;
isFirefox: boolean;
};
//# sourceMappingURL=index.d.ts.map