Class SpeechProcessor
Base class for all speech processors.
Inheritance
System.Object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    SpeechProcessor
      
      
      
  Namespace: Recognissimo
Assembly: Recognissimo.dll
Syntax
public abstract class SpeechProcessor : MonoBehaviourProperties
AutoStart
Whether to execute StartProcessing() at start.
Declaration
public bool AutoStart { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Finished
SpeechProcessor successfully finished.
Declaration
public UnityEvent Finished { get; }Property Value
| Type | Description | 
|---|---|
| UnityEngine.Events.UnityEvent | 
InitializationFailed
SpeechProcessor or one of its dependencies failed during initialization.
Declaration
public UnityEvent<InitializationException> InitializationFailed { get; }Property Value
| Type | Description | 
|---|---|
| UnityEngine.Events.UnityEvent<InitializationException> | 
LanguageModelProvider
Language model provider. This value is read when StartProcessing() called.
Declaration
public LanguageModelProvider LanguageModelProvider { get; set; }Property Value
| Type | Description | 
|---|---|
| LanguageModelProvider | 
RuntimeFailed
SpeechProcessor or SpeechSource dependency failed at runtime.
Declaration
public UnityEvent<RuntimeException> RuntimeFailed { get; }Property Value
| Type | Description | 
|---|---|
| UnityEngine.Events.UnityEvent<RuntimeException> | 
SpeechSource
Speech source. This value is read when StartProcessing() called.
Declaration
public SpeechSource SpeechSource { get; set; }Property Value
| Type | Description | 
|---|---|
| SpeechSource | 
Started
SpeechProcessor successfully started.
Declaration
public UnityEvent Started { get; }Property Value
| Type | Description | 
|---|---|
| UnityEngine.Events.UnityEvent | 
State
Current state of SpeechProcessor
Declaration
public SpeechProcessorState State { get; }Property Value
| Type | Description | 
|---|---|
| SpeechProcessorState | 
Methods
StartProcessing()
Start speech processing. SpeechProcessor will setup itself asynchronously, then emit Started. SpeechSource and LanguageModelProvider must be set by the time the method is called.
Declaration
public void StartProcessing()Exceptions
| Type | Condition | 
|---|---|
| System.InvalidOperationException | If SpeechSource or LanguageModelProvider is null. | 
StopProcessing()
Stop speech processing. SpeechProcessor will:
- stop accepting new samples;
- process the remaining samples;
- emit Finished.
Declaration
public void StopProcessing()