capacitor-microphone
v0.0.16
Published
plugin to use the microphone
Readme
capacitor-microphone
plugin to use the microphone
Install
npm install capacitor-microphone
npx cap syncAPI
checkPermission()requestPermission()checkRequestPermission()startListening(...)stopListening()addListener('partialResult', ...)removeAllListeners()- Interfaces
checkPermission()
checkPermission() => Promise<MicrophonePermissions>Returns: Promise<MicrophonePermissions>
requestPermission()
requestPermission() => Promise<MicrophonePermissions>Returns: Promise<MicrophonePermissions>
checkRequestPermission()
checkRequestPermission() => Promise<MicrophonePermissions>Returns: Promise<MicrophonePermissions>
startListening(...)
startListening(options?: StartListeningOptions | undefined) => Promise<SpeechResult>| Param | Type |
| ------------- | ----------------------------------------------------------------------- |
| options | StartListeningOptions |
Returns: Promise<SpeechResult>
stopListening()
stopListening() => Promise<{ stopped: boolean; }>Returns: Promise<{ stopped: boolean; }>
addListener('partialResult', ...)
addListener(eventName: 'partialResult', listenerFunc: (data: SpeechResult) => void) => Promise<PluginListenerHandle>| Param | Type |
| ------------------ | ------------------------------------------------------------------------ |
| eventName | 'partialResult' |
| listenerFunc | (data: SpeechResult) => void |
Returns: Promise<PluginListenerHandle>
removeAllListeners()
removeAllListeners() => Promise<void>Interfaces
MicrophonePermissions
| Prop | Type |
| ------------------ | -------------------- |
| details | string |
| granted | boolean |
| status | string |
| errorMessage | string |
SpeechResult
| Prop | Type |
| ------------- | -------------------- |
| text | string |
| isFinal | boolean |
StartListeningOptions
| Prop | Type |
| ---------- | ------------------- |
| lang | string |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
