import { VoiceEvent } from './types/main'; import { VoiceModelDownloadStatus, type VoiceEventMap, type VoiceStartListeningOptions } from './types/main'; declare class RNVoiceKit { private listeners; constructor(); /** * Starts listening for speech. * * @param options - The options to start listening with. */ startListening(options?: VoiceStartListeningOptions): Promise; /** * Stops listening for speech. */ stopListening(): Promise; /** * Checks if a speech recognizer is available on the device. * * @returns Whether a speech recognizer is available. */ isAvailable(): Promise; /** * Gets the list of supported locales for speech recognition. On Android, this gets the list of supported locales for * the on-device speech recognizer. Note that this does not check if the model is installed already. Use * `isOnDeviceModelInstalled()` to check if the model for a given locale is installed before using it. * Does not work on Android versions below 13 and will return an empty array for those versions. * * @returns The list of supported locales. */ getSupportedLocales(): Promise; /** * Checks if the on-device speech recognizer model for the given locale is installed. If it is not, use * `downloadOnDeviceModel()` to download it. Only works on Android 13+. * Does not have any effect on iOS and will simply check if the locale is supported. * * @param locale - The locale to check. * @returns Whether the model is installed. */ isOnDeviceModelInstalled(locale: string): Promise; /** * Downloads the on-device speech recognizer model for the given locale. Only works on Android 13+. * When the download was successfully started, the promise will resolve with a `started` status. * On Android 14+,you can listen to the `VoiceEvent.ModelDownloadProgress` event to track the download progress. * Does not have any effect on iOS and will simply return a `started` status if the locale is supported, or throw * an error if it is not. * * @returns The status of the model download and whether download progress is available via the * `VoiceEvent.ModelDownloadProgress` event. */ downloadOnDeviceModel(locale: string): Promise<{ status: VoiceModelDownloadStatus; progressAvailable: boolean; }>; addListener(event: T, listener: (...arguments_: VoiceEventMap[T]) => void): void; removeListener(event: T, listener: (...arguments_: VoiceEventMap[T]) => void): void; } declare const _default: RNVoiceKit; export default _default; //# sourceMappingURL=voice-kit.d.ts.map