capacitor-plugin-speech-to-text
npm install capacitor-plugin-speech-to-text
npx cap synchasPermission()initialize()locales()stop()cancel()listen(...)addListener('textRecognition', ...)addListener('notifyStatus', ...)addListener('notifyError', ...)addListener('soundLevelChange', ...)- Interfaces
- Enums
hasPermission() => Promise<{ permission: boolean; }>Returns: Promise<{ permission: boolean; }>
initialize() => Promise<{ available: boolean; }>Returns: Promise<{ available: boolean; }>
locales() => Promise<{ languages: any[]; }>Returns: Promise<{ languages: any[]; }>
stop() => Promise<{ stopped: boolean; }>Returns: Promise<{ stopped: boolean; }>
cancel() => Promise<{ cancelled: boolean; }>Returns: Promise<{ cancelled: boolean; }>
listen(options: SpeechParams) => Promise<{ listening: boolean; }>| Param | Type |
|---|---|
options |
SpeechParams |
Returns: Promise<{ listening: boolean; }>
addListener(eventName: "textRecognition", listenerFunc: (data: { speechString: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandleCalled on textRecognition and result received
Provides textRecognition result.
| Param | Type |
|---|---|
eventName |
'textRecognition' |
listenerFunc |
(data: { speechString: string; }) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Since: 0.0.1
addListener(eventName: "notifyStatus", listenerFunc: (data: { status: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandleCalled when status changes and result received
Provides speech recognition status.
| Param | Type |
|---|---|
eventName |
'notifyStatus' |
listenerFunc |
(data: { status: string; }) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Since: 0.0.1
addListener(eventName: "notifyError", listenerFunc: (data: { error: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandleCalled when there is an error and result received
Provides speech recognition error.
| Param | Type |
|---|---|
eventName |
'notifyError' |
listenerFunc |
(data: { error: string; }) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Since: 0.0.1
addListener(eventName: "soundLevelChange", listenerFunc: (data: { soundLevel: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandleCalled when sound level changes and result received
Provides sound level change.
| Param | Type |
|---|---|
eventName |
'soundLevelChange' |
listenerFunc |
(data: { soundLevel: string; }) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Since: 0.0.1
| Prop | Type |
|---|---|
onDevice |
boolean |
partialResults |
boolean |
sampleRate |
number |
listenMode |
ListenMode |
localeStr |
string |
| Prop | Type |
|---|---|
remove |
() => Promise<void> |
| Members |
|---|
devcieDefault |
dictation |
search |
confirmation |