UNPKG

@lobehub/tts

Version:

A high-quality & reliable TTS React Hooks library

21 lines (20 loc) 588 B
import { SsmlOptions } from "../../core/utils/genSSML.mjs"; import * as react from "react"; //#region src/react/useSpeechSynthes/index.d.ts interface SpeechSynthesOptions extends Pick<SsmlOptions, 'voice' | 'rate' | 'pitch'> { onStart?: () => void; onStop?: () => void; } declare const useSpeechSynthes: (defaultText: string, { voice, rate, pitch, ...options }: SpeechSynthesOptions) => { isLoading: boolean; setText: react.Dispatch<react.SetStateAction<string>>; start: () => void; stop: () => void; }; //#endregion export { SpeechSynthesOptions, useSpeechSynthes };