How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask ehabtutor Your Own Question

ehabtutor
ehabtutor, Computer Software Engineer
Category: Programming
Satisfied Customers: 1327
Experience:  Bachelor of computer science, 5+ years experience in software development, software company owner
13535664
Type Your Programming Question Here...
ehabtutor is online now
A new question is answered every 9 seconds

VB.Net 2010 RecoContext = Recognizer.CreateRecoContext() Creating

Resolved Question:

VB.Net 2010

RecoContext = Recognizer.CreateRecoContext()

Creating an instance of the COM component with CLSID {73AD6842-ACE0-45E8-A4DD-8795881A2C2A} from the IClassFactory failed due to the following error: 80045003.

Only happens on a particular Windows 7 machine; all others work fine.

Any help would be greatly appreciated.

Robert
Submitted: 1 year ago.
Category: Programming
Expert:  ehabtutor replied 1 year ago.

ehabtutor :

Welcome to Just answer. My Name isXXXXX and i will be assisting you today.

ehabtutor :

let me know when you are ready

Customer:

I am ready.

ehabtutor :

great

ehabtutor :

the problem actually is not related to vb.net rather to the library of speech recognition you are using, I assume its speechlib right?

ehabtutor :

Please try to do the following: the speechlib will be put into the bin directory once it was added as resources. If you change the operating system, I think you must remove the speechlib.dll then re add it to the project again.

Customer:

Yes it is SpeechLib. Perhaps I can provide you with the code. As I indicated, it works on XP, Vista, Windows 7 and 8 on all customer machines... EXCEPT THIS PARTICULAR CUSTOMER!!!

ehabtutor :

ok did you read my last line?

Customer:

I did indeed. Are you suggesting that I have the customer reload a file?

ehabtutor :

did you develop this application yourself?

Customer:

Yes.

ehabtutor :

ok when you added the speechlib library

ehabtutor :

you did add it to the resources of the project right?

Customer:

Correct.

Customer:

Excuse me.... NO.

ehabtutor :

this results in the speeclib.dll file to be added to the bin directory

ehabtutor :

ok then how did you include the speechlib library?

Customer:

Correction... simply REFERENCED

ehabtutor :

can you further explain what do you mean by simply referenced?

Customer:

I have simply included an Import: Imports SpeechLib

ehabtutor :

ok the thing is it needs to be compiled under windows 7

ehabtutor :

i think it was already compiled on a different OS right?

Customer:

The customer has Win7, it was developed on Win7. In fact, I have put the development code on his PC via Teamviewer, and even in the development mode (VB.Net 2010), it fails.

ehabtutor :

ok what i am suggesting is on his pc, do the following remove the speechlib.dll from the bin folder

ehabtutor :

then readd the reference to the speech library

ehabtutor :

and re-compile the project

Customer:

Okay. What will happen if a person with x86 runs my app?

ehabtutor :

There is both a x86 and x64 versions of speechlib in the package that is referenced

ehabtutor :

so it should work normally

Customer:

BRB....

ehabtutor :

that's why i am suggested to recompile for this specific machine as it is probably different than the one you previously compiled on.

ehabtutor :

cpu difference i mean

Customer:

You're going to love this. I cannot find Speechlib.dll on his pc.

ehabtutor :

WOW

Customer:

Hmmmmmmmmm...................

Customer:

Now that I think about this, there is a:


 


Interop.Speechlib.dll


 


in the project release on all PCs - EXCEPT HIS!

ehabtutor :

I think it should be located somewhere

ehabtutor :

yes

ehabtutor :

this is the one we are looking for

ehabtutor :

ok now add the reference again and compile on this specific machine

Customer:

Perhaps his anti-virus or firewall is BLOCKING the installation of that DLL.

ehabtutor :

very uncommon but maybe

Customer:

Please give me a moment... BRB

ehabtutor :

ok sure

Customer:

Let me presume (if I may) that I am able to fix this issue on his PC, how would (can) I repair this "programatically"? I certainly do not want to be telling customers to delete files - half of them cannot even find the Start button!

Customer:

e.g. Is there a version or file size check?

ehabtutor :

I think the issue with this library is to have one compiled for x86 and another one for x64

ehabtutor :

and you can give them the appropriate version according to their cpu

Customer:

I'm sorry... that's about a clear as mud. Are you saying I need 2 different versions of the code, even though is setup to compile under AnyCPU?

ehabtutor :

yeah i presume that since the speechlib is compiled according to the cpu version where the project is compiled

ehabtutor :

does this specific machine is the only x86 machine?

Customer:

His is a Win7 and it was deployed (via ClickOnce) from Win7

Customer:

I can only assume that he has a different version of Speechlib already on his pc.

ehabtutor :

or its the missing dll issue

ehabtutor :

you said the dll is on all other installation except this one

Customer:

Doesn't ClickOnce have enough brains to deploy the correct library files?

Customer:

Sorry.... I was typing

Customer:

What I said was that it runs fine on hundreds of x86 and Win7/8 pcs - EXCEPT HIS!

ehabtutor :

but the question is , is this one a 64 bit processor?

Customer:

Sorry - yes. Both the development PC and his PC are 64 bit machines

ehabtutor :

ok then the inspection you said regarding the anti virus maybe correct

ehabtutor :

something prevented the dll to be written to the bin folder

ehabtutor :

can you copy it form another version and paste it to this specific client machine and try to re-run

Customer:

Yes. I will do just that. I will copy the DLL from my development environment into his PC.


 


Okay----let me do some further testing. IS there a way to keep this topic open?

ehabtutor :

you can bookmark this page

ehabtutor :

and come back anytime. once you post here i will be notified by email.

Customer:

Fine. I'll be as quick as possible. Thanks a lot. Later.............

ehabtutor :

please take a minute to leave me a positive feedback when you can as this is the only way i get compensated for my time and effort

Customer:

Without question. Regards, Robert

ehabtutor :

Thanks in advance

ehabtutor :

Please make sure you have the following set: "platform target" dropdown in project-->properties-->build - setting it to "Any CPU"

Customer:

Hello. I'm back. I've tried deleting the Speechlib.DLL and re-deployed from the 64-bit PC in the lab... sme problem.

Customer:

Then, I removed and then added the DLL in the development environment on the user's PC.... same problem.

Customer:

BTW.... it works fine in the SHARED MODE... it only fails in the INPROC MODE.

ehabtutor :

did you get my last message?

Customer:

Here's the code:


 


Imports SpeechLib
Imports SpeechLib.SpeechStringConstants


' ======================================================================
' COMMENT IN FOR SHARED MODE - COMMENT OUT FOR INPROC MODE
'Public RecoInProc As Boolean = False
'Public Recognizer As New SpSharedRecognizer
'Public WithEvents RecoContext As New SpSharedRecoContext
'Public Grammar As ISpeechRecoGrammar
' ======================================================================
' COMMENT IN FOR INPROC MODE - COMMENT OUT FOR SHARED MODE
Public RecoInProc As Boolean = True
Public Recognizer As SpInprocRecognizer
Public WithEvents RecoContext As SpInProcRecoContext
Public Grammar As ISpeechRecoGrammar
' ======================================================================
Public GrammarID = 1
Public WithEvents Voice As New SpeechLib.SpVoice


Public Sub InitializeSpeech()
Try
If RecoInProc Then
Recognizer = New SpInprocRecognizer
Debug.Print(Recognizer.GetProfiles.Item(0).GetDescription)
Dim ObjectTokenCat As ISpeechObjectTokenCategory
ObjectTokenCat = New SpObjectTokenCategory
ObjectTokenCat.SetId(SpeechCategoryAudioIn)
Debug.Print(ObjectTokenCat.Default)
Recognizer.AudioInput = ObjectTokenCat.EnumerateTokens.Item(0)
Debug.Print(Recognizer.AudioInput.Category.Default)
RecoContext = Recognizer.CreateRecoContext() <<<<<<<<<<<< FAILS HERE !!!!!!!!!!!!
Debug.Print(RecoContext.Recognizer.AudioInput.GetDescription)
Else
RecoContext = New SpSharedRecoContext 'SpInProcRecoContext
Recognizer = RecoContext.Recognizer <<<<<<<<<<<< WORKS HERE !!!!!!!!!!!!
LogEvent(1, "InitializeSpeech:Recognizer.Profile: " & Recognizer.Profile.GetDescription)
LogEvent(1, "InitializeSpeech:Recognizer.Profile.Category.Default: " & Recognizer.Profile.Category.Default)
End If
Catch ex As Exception
LogEvent(1, "ERROR: " & Err.Number.ToString & " DESC: " & Err.Description)
End Try


Try
Grammar = RecoContext.CreateGrammar(GrammarID)
LogEvent(1, "InitializeSpeech:BeforeLoadingSTTFile: " & STTRoot)
Grammar.CmdLoadFromFile(STTRoot, SpeechLoadOption.SLODynamic)
LogEvent(1, "InitializeSpeech:AfterLoadingSTTFile: " & STTRoot)
LogEvent(1, "InitializeSpeech:BeforeSpeechRuleState.SGDSInactive")
Grammar.DictationSetState(SpeechRuleState.SGDSInactive)
LogEvent(1, "InitializeSpeech:AfterSpeechRuleState.SGDSInactive")
Grammar.CmdSetRuleState("", SpeechRuleState.SGDSInactive)
LogEvent(1, "InitializeSpeech:BeforeSpeechRuleState.Commit")
Grammar.Rules.Commit()
LogEvent(1, "InitializeSpeech:AfterSpeechRuleState.Commit")
LogEvent(1, "InitializeSpeech:BeforeSpeechRuleState.SGDSActive")
Grammar.CmdSetRuleState("", SpeechRuleState.SGDSActive)
LogEvent(1, "InitializeSpeech:AfterSpeechRuleState.SGDSActive")
Catch ex As Exception
LogEvent(1, "ERROR: " & Err.Number.ToString & " DESC: " & Err.Description)
End Try
HasInitializedSpeech = True
End Sub

Customer:

REGARDING: Please make sure you have the following set: "platform target" dropdown in project-->properties-->build - setting it to "Any CPU"


 


It is.

ehabtutor :

it works fine in the SHARED MODE... it only fails in the INPROC MODE.? what difference does it make for your project

Customer:

In the shared mode, voice commands will drive desktop functions. e.g., "Open Notepad". In the InProc mode, the desktop speech box is not present and voice commands only go to our app.

Customer:

Please keep in mind that it works on hundreds of other PCs just fine!

ehabtutor :

oh i see so it must be in proc in order for the speech to function correctly

ehabtutor :

yeah there must be something different about this pc

Customer:

Correct. Otherwise, a customer will say, "Start engine", and the "Start" button on the desktop open! NOT GOOD )-:

ehabtutor :

so there must be something about this specific client machine

ehabtutor :

can you double check the bin folder

ehabtutor :

see if it is an exact copy of other installations

Customer:

I agree. But, for the life of me, I cannot figure it out. If you look at the code, (<<<< WORKS HERE) you'll see that the SHARED MODE works. Yet, the inproc (<<<<<<< FAILS HERE) creates the error. And the error message is also strange. It says that the FORMAT IS WRONG. That only applies to inputs from WAV files... not microphones.

Customer:

BTW... do you want to see the error message? Would that help?

ehabtutor :

I think there is another dll that should be associated with the speechlib but can't remember its name

ehabtutor :

Isn't that the one you already added to the main question?

Customer:

Hmmmm

Customer:

Basically yes. But I have an image of it in mode detail.

Customer:

mode=more

ehabtutor :

ok sure you can use the paper clip icon here to send it to me

Customer:

Full Size Image

Customer:

I don't know if this will make the mud any clearer!

ehabtutor :

I checked it

ehabtutor :

I am sorry i am out of ideas here. I think i will be opting out for other experts to share their thoughts

Customer:

I'm sorry to hear this. Shall I pay you for your time in any case?

ehabtutor :

This is up to you. If you wish to do so, just leave me a positive rating.

ehabtutor :

Thank you in all cases. I tried to help as much as i could

Customer:

Okay. Thanks.


Robert


http://www.itsyourplane.com

ehabtutor :

Thank you robert

ehabtutor, Computer Software Engineer
Category: Programming
Satisfied Customers: 1327
Experience: Bachelor of computer science, 5+ years experience in software development, software company owner
ehabtutor and 5 other Programming Specialists are ready to help you

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Last | Next >
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
 
 
 

Meet The Experts:

 
 
 
  • ATLPROG

    Computer Software Engineer

    Satisfied Customers:

    7463
    MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
< Last | Next >
  • http://ww2.justanswer.com/uploads/SP/spatlanta2010/2011-6-23_12450_photo.64x64.gif ATLPROG's Avatar

    ATLPROG

    Computer Software Engineer

    Satisfied Customers:

    7463
    MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Computer Software Engineer

    Satisfied Customers:

    5603
    Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.
  • http://ww2.justanswer.com/uploads/unvadim/2010-11-15_210218_avatar.jpg unvadim's Avatar

    unvadim

    Computer Software Engineer

    Satisfied Customers:

    1158
    Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.
  • http://ww2.justanswer.com/uploads/lifesaver333/2010-10-17_191349_ls.jpeg lifesaver's Avatar

    lifesaver

    Computer Software Engineer

    Satisfied Customers:

    950
    Several years of intensive programming and application development experience in various platforms.
  • http://ww2.justanswer.com/uploads/EH/ehabtutor/2012-8-2_202016_1.64x64.jpg ehabtutor's Avatar

    ehabtutor

    Computer Software Engineer

    Satisfied Customers:

    864
    Bachelor of computer science, 5+ years experience in software development, software company owner
  • http://ww2.justanswer.com/uploads/RA/rajivsharma086/2012-6-6_17128_displaypic.64x64.jpg Raj's Avatar

    Raj

    Computer Engg.

    Satisfied Customers:

    860
    BE CS, 4+ Experience in Programming and Database (ERP)
  • http://ww2.justanswer.com/uploads/eljonis/2010-01-06_130406_eljon2.jpg Eljon's Avatar

    Eljon

    Consultant

    Satisfied Customers:

    590
    11 yrs of programming (PHP, WordPress, XSL, SQL, JavaScript)
 
 
 

Related Programming Questions

Chat Now With A Programmer
ehabtutor
ehabtutor
C.E.O
931 Satisfied Customers
Bachelor of computer science, 5+ years experience in software development, software company owner