Centrafuse SDK Logo ALPHA 2 RELEASE


ICFVoice Interface Reference

Centrafuse Voice Recognition Interface. More...

Inherits centrafuse::Plugins::ICFInterfaceSetup.

Collaboration diagram for ICFVoice:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool Init ()
 Load voice recognition, load basic centrafuse VR command grammar(s).
bool CreateGrammar (CFVrGrammarType type, string[] strings)
 Loads dynamic grammars.
void Cleanup ()
 Close voice recognition, clean up all resources.
bool Start ()
 Start voice recognition.
bool StartSTT ()
 Start Speech-To-Text capture.
CFVrEnumResponse GetEnumResponse ()
 Get one of the pre-defined enumertaed responses.
void Stop ()
 Stop voice recognition if currently active.
CFControls.CFListViewItem[] CF_setupLoadVoiceCommandsList ()
 Used for allowing a user to change CF main voice command syntax.
void CF_setupSaveVoiceCommand (string id, string command)
 Used for allowing a user to change CF main voice command syntax.
void CF_setupReadSettings (int page, bool advanced, CFSetupHandler[] buttonHandlers, string[] buttonLabels, string[] buttonValues)
 Custom settings setup.
void CF_setupExitSettings (bool save)
 Save currently loaded custom settings to file.
void CF_setupReloadSharedSettings ()
 Reload Centrafuse shared settings.

Properties

bool isActive [get]
 Indicates whether voice recognition is currently astive.
int numBasicSetupPages [get]
 Number of settings pages in Basic Settings..
int numAdvancedSetupPages [get]
 Number of settings pages in Advanced Settings..

Events

CFVrCompleteHandler VrComplete
 Event fires when VR has finished.

Detailed Description

Centrafuse Voice Recognition Interface.

Overview

Voice modules compiled for Centrafuse reference the CFPlugin dll, included in this SDK in the root directory. The CFPlugin dll provides the developer with all of the necessary interfaces and classes to create functional pieces to work in conjunction with Centrafuse software. For example, popular plugins that already exist are SkinBrowser, LogoDashboard, and FileSync. Satellite Radio is also implemented in CF as a plugin. Radio support is added through use of a plugin. Basically anything a developer can imagine can be added to CF.


Inheritance and ICFVoice

Centrafuse Radio Modules are (Microsoft termed) "Class libraries", built from projects in .NET that produce a dll library object that Centrafuse can load at runtime. These dll's must expose at least 1 form which inherits from ICFVoice, available through the Centrafuse Plugin Interface Dll, cfplugin.dll, which must be referenced by plugin's project.

Your voice interface will always inherit the ICFVoice interface.


The Voice Module constructor

Your voice module dll will of course contain a constructor, whether or not you choose to implement one is up to you. Your constructor is called when your radio module dll is loaded into memory, keep in mind that initialization of Centrafuse HAS NOT completed yet. To be sure that Centrafuse initialization is complete when you initialize your plugin, wait until your CF_pluginInit() override is called, which is directly following Centrafuse initialization. In the following example, just some simple flags are set, and the call to a function that will create a plugin config.xml file if it doesn't exist.


Member Function Documentation

void CF_setupExitSettings ( bool  save  )  [inherited]

Save currently loaded custom settings to file.

Interface shall build the setup for any custom settings that may be required, and shall implement a Save() routine to handle when the SAVE button is clicked by user. Settings should not be saved to file until this function is called by Centrafuse.

CFControls.CFListViewItem [] CF_setupLoadVoiceCommandsList (  ) 

Used for allowing a user to change CF main voice command syntax.

Voice interface shall return an array of FControls.CFListViewItem[] indicating current commands, and associating id's with those commands if needed. If any one command is changed by user, Centrafuse will let the voice interface know via the CF_setupSaveVoiceCommand() function.

void CF_setupReadSettings ( int  page,
bool  advanced,
CFSetupHandler[]  buttonHandlers,
string[]  buttonLabels,
string[]  buttonValues 
) [inherited]

Custom settings setup.

Interface shall build the setup for any custom settings that may be required.

void CF_setupReloadSharedSettings (  )  [inherited]

Reload Centrafuse shared settings.

Interface shall build the setup for any custom settings that may be required, and shall implement a Reload() routine to handle when the SAVE button is clicked by user for the Shared settings. All shared settings should be reloaded when this function is called by Centrafuse.

void CF_setupSaveVoiceCommand ( string  id,
string  command 
)

Used for allowing a user to change CF main voice command syntax.

Will be called by Centrafuse as a result of a user changing voice command syntax for the main CF commands. This list of commands to edit is provided to Centrafuse by the voice interface via the CF_setupLoadVoiceCommandsList() function.

void Cleanup (  ) 

Close voice recognition, clean up all resources.

bool CreateGrammar ( CFVrGrammarType  type,
string[]  strings 
)

Loads dynamic grammars.

Phonebook (Contact list): Create grammar in the form of "Call [contactname]", on successful recognition, VrCompleteHandler shall use CF_Actions.CALL as the command, and the contact name as querytext. Centrafuse will check the contact name for a succesful match against the cf phonebook in the following order: [fname] [lname], [lname], [fname], [company]. Song list, Artist list, Album list

Parameters:
type One of CFVrGrammarType
strings Array of dynamic texts, i.e. for phonebook, the contact names and/or companies contained in the Centrafuse phonebook
CFVrEnumResponse GetEnumResponse (  ) 

Get one of the pre-defined enumertaed responses.

This must be a synchronous call, the interface shall return one of the enumerated responses as a return value from this function. If no enumerated response (yes, no, home, work, cell, cancel) was spoken, return Invalid.

Returns:
One of CFVrEnumResponse
bool Init (  ) 

Load voice recognition, load basic centrafuse VR command grammar(s).

bool Start (  ) 

Start voice recognition.

When voice recognition completes or times out, the vr interface shall notify the application via any registered VrCompleteHandler callback functions, with a CF_Action and any following querytext.

bool StartSTT (  ) 

Start Speech-To-Text capture.

When SPP completes or times out, the vr interface shall notify the application via any registered VrCompleteHandler callback functions, with the complete text spoken.

void Stop (  ) 

Stop voice recognition if currently active.

Stop any active VR, disable, leave in an inactive state.


Property Documentation

bool isActive [get]

Indicates whether voice recognition is currently astive.

int numAdvancedSetupPages [get, inherited]

Number of settings pages in Advanced Settings..

int numBasicSetupPages [get, inherited]

Number of settings pages in Basic Settings..


Event Documentation

CFVrCompleteHandler VrComplete

Event fires when VR has finished.

Indicates success, gives info for any CF command and text.





Copyright © 2010 Flux Media, Inc. (U.S. Copyright Registration Number: TXu-1-239-794)