@yuntijs/ui
Version:
☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps
14 lines (13 loc) • 558 B
TypeScript
/// <reference types="react" />
import type { SsmlOptions } from '@lobehub/tts/es/core/utils/genSSML';
export interface SpeechSynthesOptions extends Pick<SsmlOptions, 'voice' | 'rate' | 'pitch'> {
onStart?: () => void;
onStop?: () => void;
}
export declare const useSpeechSynthes: (defaultText: string, { voice, rate, pitch, ...options }: SpeechSynthesOptions) => {
isLoading: boolean;
setText: import("react").Dispatch<import("react").SetStateAction<string>>;
start: () => void;
stop: () => void;
};
export default useSpeechSynthes;