UNPKG

@memori.ai/memori-react

Version:

[![npm version](https://img.shields.io/github/package-json/v/memori-ai/memori-react)](https://www.npmjs.com/package/@memori.ai/memori-react) ![Tests](https://github.com/memori-ai/memori-react/workflows/CI/badge.svg?branch=main) ![TypeScript Support](https

27 lines (26 loc) 927 B
/// <reference types="react" /> export interface TTSConfig { provider: 'azure' | 'openai'; voice?: string; model?: string; region?: string; tenant?: string; } export interface UseTTSOptions { apiUrl?: string; continuousSpeech?: boolean; onEndSpeakStartListen?: () => void; preview?: boolean; disableSpeaker?: boolean; } export declare function useTTS(config: TTSConfig, options?: UseTTSOptions, autoStart?: boolean, defaultEnableAudio?: boolean, defaultSpeakerActive?: boolean): { speak: (text: string) => Promise<void>; stop: () => void; isPlaying: boolean; speakerMuted: boolean; toggleMute: (mute?: boolean) => void; hasUserActivatedSpeak: boolean; setHasUserActivatedSpeak: import("react").Dispatch<import("react").SetStateAction<boolean>>; error: Error | null; setError: import("react").Dispatch<import("react").SetStateAction<Error | null>>; };