Class SpeechSource
Base class for all speech sources.
Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
SpeechSource
Inherited Members
Namespace: Recognissimo
Assembly: Recognissimo.dll
Syntax
public abstract class SpeechSource : SpeechProcessorDependency
Properties
SampleRate
Speech sampling rate. Must be set during initialization.
Declaration
public virtual int SampleRate { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
OnDried()
Helper method for triggering the event.
Declaration
protected void OnDried()
OnRuntimeFailure(RuntimeFailureEventArgs)
Helper method for triggering the event.
Declaration
protected void OnRuntimeFailure(RuntimeFailureEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
RuntimeFailureEventArgs | eventArgs | Event argument. |
OnSamplesReady(SamplesReadyEventArgs)
Helper method for triggering the event.
Declaration
protected void OnSamplesReady(SamplesReadyEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
SamplesReadyEventArgs | eventArgs | Event argument. |
StartProducing()
Called by SpeechProcessor at the start of processing.
Declaration
public abstract void StartProducing()
StopProducing()
Called when processing stops (e.g. when StopProcessing() called or when RuntimeFailure event emitted).
Declaration
public abstract void StopProducing()
Events
Dried
Raised when SpeechSource have run out of samples.
Declaration
public event EventHandler Dried
Event Type
Type | Description |
---|---|
System.EventHandler |
RuntimeFailure
Raised when SpeechSource failed during runtime.
Declaration
public event EventHandler<RuntimeFailureEventArgs> RuntimeFailure
Event Type
Type | Description |
---|---|
System.EventHandler<RuntimeFailureEventArgs> |
SamplesReady
Raised when new samples arrive.
Declaration
public event EventHandler<SamplesReadyEventArgs> SamplesReady
Event Type
Type | Description |
---|---|
System.EventHandler<SamplesReadyEventArgs> |