API reference
API reference
Select your platform
No SDKs available
No versions available

WitService Class

Properties

Access pub sub
Active if recording, transmitting, or queued up
IVoiceEventProvider VoiceEventProvider[Get]
ITelemetryEventsProvider TelemetryEventsProvider[Get]
IWitRuntimeConfigProvider ConfigurationProvider[Get]
Gets/Sets a custom transcription provider. This can be used to replace any built in asr with an on device model or other provided source
Generic voice service request provider

Fields

WitConfiguration Configuration[Get]
Returns true if wit is currently active and listening with the mic
WitRuntimeConfiguration RuntimeConfiguration[Get]
VoiceEvents VoiceEvents[Get]
TelemetryEvents TelemetryEvents[Get]
bool MicActive[Get]

Protected Fields

bool ShouldSendMicData[Get]

Member Functions

Check configuration, client access token & app id
Handle web socket request if possible
Activate the microphone and send data to Wit for NLU processing.
void Activate
( WitRequestOptions requestOptions )
Activate the microphone and wait for threshold and then send data
Parameters
requestOptions
Additional options such as dynamic entities
requestEvents
Events specific to the request's lifecycle
Activate the microphone and immediately send data to Wit for NLU processing.
void ActivateImmediately
( WitRequestOptions requestOptions )
Activate the microphone and send data for NLU processing with custom request options.
Parameters
requestOptions
Additional options such as dynamic entities
requestEvents
Events specific to the request's lifecycle
Execute a wit request immediately
Parameters
recordingRequest
Activate the microphone and send data to Wit for NLU processing.
void Activate
( string text,
WitRequestOptions requestOptions )
Send text data for NLU processing with custom request options & events.
Parameters
text
Text to be used for NLU processing
requestOptions
Additional options such as dynamic entities
requestEvents
Events specific to the request's lifecycle
Stop listening and submit the collected microphone data to wit for processing.
Stop listening and cancel a specific report
Stop listening and abort any requests that may be active without waiting for a response.

Protected Functions

void Awake ( )
void OnEnable ( )
void OnDisable ( )
Method called whenever the OnConfigurationUpdated action is invoked to re-init all runtime configuration based setup.
virtual void OnSceneLoaded
( Scene scene,
LoadSceneMode mode )
void SetMicDelegates
( bool add )
Sends recording request if possible
Setup recording request
Parameters
recordingRequest
Did you find this page helpful?
Thumbs up icon
Thumbs down icon