import * as solid_js from 'solid-js'; import { MaybeAccessor } from '@solidjs-use/shared'; import { ConfigurableWindow } from '../_configurable.js'; type UseSpeechSynthesisStatus = 'init' | 'play' | 'pause' | 'end'; interface UseSpeechSynthesisOptions extends ConfigurableWindow { /** * Language for SpeechSynthesis * * @default 'en-US' */ lang?: MaybeAccessor; /** * Gets and sets the pitch at which the utterance will be spoken at. * * @default 1 */ pitch?: SpeechSynthesisUtterance['pitch']; /** * Gets and sets the speed at which the utterance will be spoken at. * * @default 1 */ rate?: SpeechSynthesisUtterance['rate']; /** * Gets and sets the voice that will be used to speak the utterance. */ voice?: MaybeAccessor; /** * Gets and sets the volume that the utterance will be spoken at. * * @default 1 */ volume?: SpeechSynthesisUtterance['volume']; } /** * Reactive SpeechSynthesis. * * @see https://solidjs-use.github.io/solidjs-use/core/useSpeechSynthesis * @see https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis SpeechSynthesis */ declare function useSpeechSynthesis(text: MaybeAccessor, options?: UseSpeechSynthesisOptions): { isSupported: solid_js.Accessor; isPlaying: solid_js.Accessor; status: solid_js.Accessor; utterance: solid_js.Accessor; error: solid_js.Accessor; stop: () => void; toggle: (value?: boolean) => void; speak: () => void; }; type UseSpeechSynthesisReturn = ReturnType; export { UseSpeechSynthesisOptions, UseSpeechSynthesisReturn, UseSpeechSynthesisStatus, useSpeechSynthesis };