You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.



  • "vpr" is male
  • "vpr" started this thread

Posts: 30

Date of registration: May 21st 2014

  • Send private message


Tuesday, November 3rd 2015, 5:15pm

Constructor/Declarations Question (Sphinx)


I have a question that relates to me trying to get Sphinx working with Jabaco. However, my query is less specific than that. I'm looking at the tutorial here:

My question is to do with using constructors. Say I have this code:

Dim config As New Configuration

' Set path To acoustic model.
' Set path To dictionary.
' Set language model.

Dim recognizer As New LiveSpeechRecognizer(config)

' Start recognition process pruning previously cached data.

Dim result As SpeechResult= recognizer.getResult()

'Pause recognition process. It can be resumed Then With startRecognition(False).


I want to keep the declarations in general declarations, so that I can access things like result.getHypothesis from anywhere in my code.

However, I can't put Dim recognizer As New LiveSpeechRecognizer(config) in general declarations because I need to invoke the .setAcousticModelPath .setDictionaryPath and .setLanguageModelPath methods as part of the construction of config (which can't be done in general declarations).

How would I get around this?

Rate this thread
WoltLab Burning Board