UNPKG

@lobehub/tts

Version:

A high-quality & reliable TTS React Hooks library

22 lines (21 loc) 561 B
import { AudioProps } from "../AudioPlayer/index.mjs"; import { RefObject } from "react"; //#region src/react/hooks/useAudioPlayer.d.ts interface AudioPlayerResponse extends AudioProps { arrayBuffers: ArrayBuffer[]; download: () => void; isLoading?: boolean; ref: RefObject<HTMLAudioElement>; reset: () => void; url: string; } interface AudioPlayerOptions { src?: string; type?: string; } declare const useAudioPlayer: ({ src, type }?: AudioPlayerOptions) => AudioPlayerResponse; //#endregion export { AudioPlayerResponse, useAudioPlayer };