react-edge-tts
Version:
Generate text-to-speech narration for React content using Microsoft Edge TTS
43 lines • 1.38 kB
TypeScript
import React from 'react';
import '../styles/NarrationPlayer.css';
interface NarrationPlayerProps {
/** Title of the narration (matches the Narrate component's title) */
title: string;
/** Path to the audio file. If not provided, will look in default narration-audio directory */
src?: string;
/** Custom class name for the container */
className?: string;
/** Custom styles for the container */
style?: React.CSSProperties;
/** Show/hide the time display */
showTime?: boolean;
/** Show/hide the volume control */
showVolume?: boolean;
/** Initial volume (0-1) */
defaultVolume?: number;
/** Custom theme colors */
theme?: {
primary?: string;
secondary?: string;
background?: string;
text?: string;
};
/** Metadata for MediaSession API */
metadata?: {
title?: string;
artist?: string;
album?: string;
artwork?: MediaImage[];
};
/** Callback when audio starts playing */
onPlay?: () => void;
/** Callback when audio is paused */
onPause?: () => void;
/** Callback when audio ends */
onEnded?: () => void;
/** Callback when an error occurs */
onError?: (error: Error) => void;
}
export declare const NarrationPlayer: React.FC<NarrationPlayerProps>;
export {};
//# sourceMappingURL=NarrationPlayer.d.ts.map