0.0.1 • Published 6 months ago

capacitor-plugin-speech-to-text v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

capacitor-plugin-speech-to-text

capacitor-plugin-speech-to-text

Install

npm install capacitor-plugin-speech-to-text
npx cap sync

API

hasPermission()

hasPermission() => Promise<{ permission: boolean; }>

Returns: Promise<{ permission: boolean; }>


initialize()

initialize() => Promise<{ available: boolean; }>

Returns: Promise<{ available: boolean; }>


locales()

locales() => Promise<{ languages: any[]; }>

Returns: Promise<{ languages: any[]; }>


stop()

stop() => Promise<{ stopped: boolean; }>

Returns: Promise<{ stopped: boolean; }>


cancel()

cancel() => Promise<{ cancelled: boolean; }>

Returns: Promise<{ cancelled: boolean; }>


listen(...)

listen(options: SpeechParams) => Promise<{ listening: boolean; }>
ParamType
optionsSpeechParams

Returns: Promise<{ listening: boolean; }>


addListener('textRecognition', ...)

addListener(eventName: "textRecognition", listenerFunc: (data: { speechString: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Called on textRecognition and result received

Provides textRecognition result.

ParamType
eventName'textRecognition'
listenerFunc(data: { speechString: string; }) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 0.0.1


addListener('notifyStatus', ...)

addListener(eventName: "notifyStatus", listenerFunc: (data: { status: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Called when status changes and result received

Provides speech recognition status.

ParamType
eventName'notifyStatus'
listenerFunc(data: { status: string; }) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 0.0.1


addListener('notifyError', ...)

addListener(eventName: "notifyError", listenerFunc: (data: { error: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Called when there is an error and result received

Provides speech recognition error.

ParamType
eventName'notifyError'
listenerFunc(data: { error: string; }) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 0.0.1


addListener('soundLevelChange', ...)

addListener(eventName: "soundLevelChange", listenerFunc: (data: { soundLevel: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Called when sound level changes and result received

Provides sound level change.

ParamType
eventName'soundLevelChange'
listenerFunc(data: { soundLevel: string; }) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 0.0.1


Interfaces

SpeechParams

PropType
onDeviceboolean
partialResultsboolean
sampleRatenumber
listenModeListenMode
localeStrstring

PluginListenerHandle

PropType
remove() => Promise<void>

Enums

ListenMode

Members
devcieDefault
dictation
search
confirmation
0.0.1

6 months ago