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

VoiceService Class

Meta::WitAi::VoiceService extends Meta.WitAi.BaseSpeechService.
Meta::WitAi::VoiceService extends Meta.WitAi.IVoiceService.
Meta::WitAi::VoiceService extends Meta.Conduit.IInstanceResolver.
Meta::WitAi::VoiceService extends Meta.WitAi.Interfaces.IAudioEventProvider.

Overview

Properties

bool
When set to true, the service will use platform integration.
Wit configuration accessor via IWitConfigurationProvider
IConduitDispatcher
The Conduit-based dispatcher that dispatches incoming invocations based on a manifest.
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
abstract bool
Returns true if this voice service is currently reading data from the microphone
abstract bool
Returns true if the audio input should be read in an activation

Object Data

events[Get]
This field should not be accessed outside the Wit-Unity library. If you need access to events you should be using the VoiceService.VoiceEvents property instead.

Data Fields

bool
Returns true if the service is actively communicating with Wit.ai during an Activation. The mic may or may not still be active while this is true.
A subset of events around collection of audio data
A subset of events around receiving transcriptions

Object Data

override SpeechEvents
If applicable, get all speech events
Constructs a VoiceService
override void
void
void
Awake ( )
override void
On enable, begin watching for request initialized callbacks
override void
On enable, stop watching for request initialized callbacks
void
OnFinalTranscription
( string transcription )
Activate message if transcription provider returns a final transcription
void

Public Member Functions

void
Activate
( string text )
Send text data for NLU processing. Results will return the same way a voice based activation would.
void
Activate
( string text,
WitRequestOptions requestOptions )
Send text data for NLU processing. Results will return the same way a voice based activation would.
Activate
( string text,
VoiceServiceRequestEvents requestEvents )
Send text data for NLU processing. Results will return the same way a voice based activation would.
Activate
( string text,
WitRequestOptions requestOptions,
VoiceServiceRequestEvents requestEvents )
Send text data for NLU processing with custom request options.
void
Start listening for sound or speech from the user and start sending data to Wit.ai once sound or speech has been detected.
void
Activate
( WitRequestOptions requestOptions )
Start listening for sound or speech from the user and start sending data to Wit.ai once sound or speech has been detected.
Start listening for sound or speech from the user and start sending data to Wit.ai once sound or speech has been detected.
Activate
( WitRequestOptions requestOptions,
VoiceServiceRequestEvents requestEvents )
Start listening for sound or speech from the user and start sending data to Wit.ai once sound or speech has been detected.
void
Activate the microphone and send data for NLU processing immediately without waiting for sound/speech from the user to begin.
void
Activate the microphone and send data for NLU processing immediately without waiting for sound/speech from the user to begin.
Activate the microphone and send data for NLU processing immediately without waiting for sound/speech from the user to begin.
Activate the microphone and send data for NLU processing immediately without waiting for sound/speech from the user to begin.
IEnumerable< object >
GetObjectsOfType
( Type type )
Returns objects of the specified type.

Details

Properties

virtual bool Meta.WitAi.VoiceService.UsePlatformIntegrations
When set to true, the service will use platform integration.
WitConfiguration Meta.WitAi.VoiceService.WitConfiguration
Wit configuration accessor via IWitConfigurationProvider
IConduitDispatcher Meta.WitAi.VoiceService.ConduitDispatcher
The Conduit-based dispatcher that dispatches incoming invocations based on a manifest.
abstract ITranscriptionProvider Meta.WitAi.VoiceService.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
abstract bool Meta.WitAi.VoiceService.MicActive
Returns true if this voice service is currently reading data from the microphone
virtual VoiceEvents Meta.WitAi.VoiceService.VoiceEvents
No description available.
virtual TelemetryEvents Meta.WitAi.VoiceService.TelemetryEvents
No description available.
abstract bool Meta.WitAi.VoiceService.ShouldSendMicData
Returns true if the audio input should be read in an activation

Object Data

VoiceEvents Meta.WitAi.VoiceService.events
This field should not be accessed outside the Wit-Unity library. If you need access to events you should be using the VoiceService.VoiceEvents property instead.
summary> Internal events used to report telemetry. These events are reserved for internal use only and should not be used for any other purpose.
TelemetryEvents Meta.WitAi.VoiceService.telemetryEvents
No description available.

Fields

virtual bool Meta.WitAi.VoiceService.IsRequestActive
Returns true if the service is actively communicating with Wit.ai during an Activation. The mic may or may not still be active while this is true.
IAudioInputEvents Meta.WitAi.VoiceService.AudioEvents
A subset of events around collection of audio data
ITranscriptionEvent Meta.WitAi.VoiceService.TranscriptionEvents
A subset of events around receiving transcriptions

Object Data

override SpeechEvents Meta.WitAi.VoiceService.GetSpeechEvents ( )
If applicable, get all speech events
Meta.WitAi.VoiceService.VoiceService ( )
Constructs a VoiceService
override void Meta.WitAi.VoiceService.OnRequestPartialResponse
( VoiceServiceRequest request )
No description available.
virtual void Meta.WitAi.VoiceService.OnValidateEarly
( VoiceServiceRequest request )
No description available.
virtual void Meta.WitAi.VoiceService.Awake ( )
No description available.
override void Meta.WitAi.VoiceService.OnEnable ( )
On enable, begin watching for request initialized callbacks
override void Meta.WitAi.VoiceService.OnDisable ( )
On enable, stop watching for request initialized callbacks
virtual void Meta.WitAi.VoiceService.OnFinalTranscription
( string transcription )
Activate message if transcription provider returns a final transcription
virtual void Meta.WitAi.VoiceService.HandleResponse
( WitResponseNode response )
No description available.

Member Functions

void Meta.WitAi.VoiceService.Activate
( string text )
Send text data for NLU processing. Results will return the same way a voice based activation would.
Parameters
text
Text to be used for NLU processing
void Meta.WitAi.VoiceService.Activate
( string text,
WitRequestOptions requestOptions )
Send text data for NLU processing. Results will return the same way a voice based activation would.
Parameters
text
Text to be used for NLU processing
requestOptions
Additional options such as dynamic entities
VoiceServiceRequest Meta.WitAi.VoiceService.Activate
( string text,
VoiceServiceRequestEvents requestEvents )
Send text data for NLU processing. Results will return the same way a voice based activation would.
Parameters
text
Text to be used for NLU processing
requestEvents
Events specific to the request's lifecycle
abstract VoiceServiceRequest Meta.WitAi.VoiceService.Activate
( string text,
WitRequestOptions requestOptions,
VoiceServiceRequestEvents requestEvents )
Send text data for NLU processing with custom request options.
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.VoiceService.Activate ( )
Start listening for sound or speech from the user and start sending data to Wit.ai once sound or speech has been detected.
void Meta.WitAi.VoiceService.Activate
( WitRequestOptions requestOptions )
Start listening for sound or speech from the user and start sending data to Wit.ai once sound or speech has been detected.
Parameters
requestOptions
Additional options such as dynamic entities
VoiceServiceRequest Meta.WitAi.VoiceService.Activate
( VoiceServiceRequestEvents requestEvents )
Start listening for sound or speech from the user and start sending data to Wit.ai once sound or speech has been detected.
Parameters
requestEvents
Events specific to the request's lifecycle
abstract VoiceServiceRequest Meta.WitAi.VoiceService.Activate
( WitRequestOptions requestOptions,
VoiceServiceRequestEvents requestEvents )
Start listening for sound or speech from the user and start sending data to Wit.ai once sound or speech has been detected.
Parameters
requestOptions
Additional options such as dynamic entities
requestEvents
Events specific to the request's lifecycle
void Meta.WitAi.VoiceService.ActivateImmediately ( )
Activate the microphone and send data for NLU processing immediately without waiting for sound/speech from the user to begin.
void Meta.WitAi.VoiceService.ActivateImmediately
( WitRequestOptions requestOptions )
Activate the microphone and send data for NLU processing immediately without waiting for sound/speech from the user to begin.
Parameters
requestOptions
Additional options such as dynamic entities
VoiceServiceRequest Meta.WitAi.VoiceService.ActivateImmediately
( VoiceServiceRequestEvents requestEvents )
Activate the microphone and send data for NLU processing immediately without waiting for sound/speech from the user to begin.
Parameters
requestEvents
Events specific to the request's lifecycle
abstract VoiceServiceRequest Meta.WitAi.VoiceService.ActivateImmediately
( WitRequestOptions requestOptions,
VoiceServiceRequestEvents requestEvents )
Activate the microphone and send data for NLU processing immediately without waiting for sound/speech from the user to begin.
Parameters
requestOptions
Additional options such as dynamic entities
requestEvents
Events specific to the request's lifecycle
IEnumerable<object> Meta.WitAi.VoiceService.GetObjectsOfType
( Type type )
Returns objects of the specified type.
Parameters
type
The type.
Returns
Objects of the specified type.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon