C# Class SpeechRecognizer.SpeechClient

The Speech to text class
Inheritance: Mycroft.App.Client
Show file Open project: rit-sse-mycroft/app-speech-to-text Class Usage Examples

Public Methods

Method Description
AddGrammar ( string name, string xml ) : void

Adds a new grammar to the SREs

AddInputMic ( string instance, UDPClient client, string status, bool shouldBeOn ) : void

Adds a new microphone instance

RemoveGrammar ( string name ) : void

Removes a grammar from the SREs

RemoveInputMic ( string instance ) : void

Removes a microphone

SpeechClient ( string manifest ) : System

Constructor for Speech client

Protected Methods

Method Description
AppDependency ( dynamic message ) : void

Called when APP_DEPENDENCY is received

AppManifestOk ( dynamic message ) : void

Called when APP_MANIFEST_OK is received

MsgBroadcast ( dynamic message ) : void

Called when MSG_BROADCAST is received

MsgQuery ( dynamic message ) : void

Called when MSG_QUERY is received

Private Methods

Method Description
DepenedencyHelper ( dynamic dep, bool shouldBeOn ) : void

Helper method for dependencies

RecognitionHandler ( object sender, SpeechRecognizedEventArgs arg ) : void

Called when speech is recognized

RecognitionRejectedHandler ( object sender, SpeechRecognitionRejectedEventArgs e ) : void

Called when speech is rejected

Method Details

AddGrammar() public method

Adds a new grammar to the SREs
public AddGrammar ( string name, string xml ) : void
name string the name of the grammar
xml string the grammar xml string
return void

AddInputMic() public method

Adds a new microphone instance
public AddInputMic ( string instance, UDPClient client, string status, bool shouldBeOn ) : void
instance string The instance id of the microphone
client UDPClient
status string The status of the microphone
shouldBeOn bool Whether the speech recognition engine should be turned on
return void

AppDependency() protected method

Called when APP_DEPENDENCY is received
protected AppDependency ( dynamic message ) : void
message dynamic The message received
return void

AppManifestOk() protected method

Called when APP_MANIFEST_OK is received
protected AppManifestOk ( dynamic message ) : void
message dynamic The message received
return void

MsgBroadcast() protected method

Called when MSG_BROADCAST is received
protected MsgBroadcast ( dynamic message ) : void
message dynamic The message received
return void

MsgQuery() protected method

Called when MSG_QUERY is received
protected MsgQuery ( dynamic message ) : void
message dynamic The message received
return void

RemoveGrammar() public method

Removes a grammar from the SREs
public RemoveGrammar ( string name ) : void
name string the name of the grammar
return void

RemoveInputMic() public method

Removes a microphone
public RemoveInputMic ( string instance ) : void
instance string The instance ID of a microphone
return void

SpeechClient() public method

Constructor for Speech client
public SpeechClient ( string manifest ) : System
manifest string path to the app manifest
return System