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

WitService Class

Meta::WitAi::WitService extends MonoBehaviour.
Meta::WitAi::WitService extends Meta.WitAi.IVoiceEventProvider.
Meta::WitAi::WitService extends Meta.WitAi.IVoiceActivationHandler.
Meta::WitAi::WitService extends Meta.WitAi.ITelemetryEventsProvider.
Meta::WitAi::WitService extends Meta.WitAi.IWitRuntimeConfigProvider.
Meta::WitAi::WitService extends Meta.WitAi.Interfaces.IWitConfigurationProvider.

Overview

Data Fields

bool
Active[Get]
Returns true if wit is currently active and listening with the mic
bool

Properties

bool
Active if recording, transmitting, or queued up
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

Object Data

Public Member Functions

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

Object Data

void
Awake ( )
void
void
void
OnSceneLoaded
( Scene scene,
LoadSceneMode mode )
void
SetMicDelegates
( bool add )
void
Sends recording request if possible
void
Setup recording request

Details

Fields

WitConfiguration Meta.WitAi.WitService.Configuration
No description available.
bool Meta.WitAi.WitService.Active
Returns true if wit is currently active and listening with the mic
WitRuntimeConfiguration Meta.WitAi.WitService.RuntimeConfiguration
No description available.
VoiceEvents Meta.WitAi.WitService.VoiceEvents
No description available.
TelemetryEvents Meta.WitAi.WitService.TelemetryEvents
No description available.
bool Meta.WitAi.WitService.MicActive
No description available.

Properties

bool Meta.WitAi.WitService.IsRequestActive
Active if recording, transmitting, or queued up
IVoiceEventProvider Meta.WitAi.WitService.VoiceEventProvider
No description available.
ITelemetryEventsProvider Meta.WitAi.WitService.TelemetryEventsProvider
No description available.
IWitRuntimeConfigProvider Meta.WitAi.WitService.ConfigurationProvider
No description available.
ITranscriptionProvider Meta.WitAi.WitService.TranscriptionProvider
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
IWitRequestProvider Meta.WitAi.WitService.WitRequestProvider
No description available.

Object Data

bool Meta.WitAi.WitService.ShouldSendMicData
No description available.

Member Functions

virtual bool Meta.WitAi.WitService.IsConfigurationValid ( )
Check configuration, client access token & app id
void Meta.WitAi.WitService.HandleWebSocketRequestGeneration
( IWitWebSocketRequest webSocketRequest )
Handle web socket request if possible
void Meta.WitAi.WitService.Activate ( )
Activate the microphone and send data to Wit for NLU processing.
void Meta.WitAi.WitService.Activate
( WitRequestOptions requestOptions )
No description available.
VoiceServiceRequest Meta.WitAi.WitService.Activate
( WitRequestOptions requestOptions,
VoiceServiceRequestEvents requestEvents )
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
void Meta.WitAi.WitService.ActivateImmediately ( )
Activate the microphone and immediately send data to Wit for NLU processing.
void Meta.WitAi.WitService.ActivateImmediately
( WitRequestOptions requestOptions )
No description available.
VoiceServiceRequest Meta.WitAi.WitService.ActivateImmediately
( WitRequestOptions requestOptions,
VoiceServiceRequestEvents requestEvents )
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
void Meta.WitAi.WitService.ExecuteRequest
( VoiceServiceRequest newRequest )
Execute a wit request immediately
Parameters
recordingRequest
void Meta.WitAi.WitService.Activate
( string text )
Activate the microphone and send data to Wit for NLU processing.
void Meta.WitAi.WitService.Activate
( string text,
WitRequestOptions requestOptions )
No description available.
VoiceServiceRequest Meta.WitAi.WitService.Activate
( string text,
WitRequestOptions requestOptions,
VoiceServiceRequestEvents requestEvents )
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
void Meta.WitAi.WitService.Deactivate ( )
Stop listening and submit the collected microphone data to wit for processing.
void Meta.WitAi.WitService.DeactivateAndAbortRequest
( VoiceServiceRequest request )
Stop listening and cancel a specific report
void Meta.WitAi.WitService.DeactivateAndAbortRequest ( )
Stop listening and abort any requests that may be active without waiting for a response.

Object Data

void Meta.WitAi.WitService.Awake ( )
No description available.
void Meta.WitAi.WitService.OnEnable ( )
No description available.
void Meta.WitAi.WitService.OnDisable ( )
No description available.
virtual void Meta.WitAi.WitService.OnSceneLoaded
( Scene scene,
LoadSceneMode mode )
No description available.
void Meta.WitAi.WitService.SetMicDelegates
( bool add )
No description available.
virtual void Meta.WitAi.WitService.SendRecordingRequest ( )
Sends recording request if possible
void Meta.WitAi.WitService.SetupRequest
( VoiceServiceRequest newRequest )
Setup recording request
Parameters
recordingRequest
Did you find this page helpful?
Thumbs up icon
Thumbs down icon