-
December 28th, 2013, 03:52 PM
#1
How to Setup VOCE (Voice Recognition API) C++
All day long I tried figuring out how to setup VOCE (http://voce.sourceforge.net).
I am using VS 2010.
What I did:
* Downloaded JDK
* Downloaded the VOCE, extracted and put in c:
* Opened VS and in properties->Vc++ Direcotories:
* In Include Directories i added: C:\voce-0.9.1\src\c++, C:\Program * Files\Java\jdk1.7.0_45\include, C:\Program Files\Java\jdk1.7.0_45\include\win32
* In Library Directories i added: C:\voce-0.9.1\lib, C:\Program * Files\Java\jdk1.7.0_45\lib
ALSO: I didn't get what i suppose to do with C:\voce-0.9.1\lib everything there * is winrars
Tried to compile a sample file and it gives me the error:
Testing.obj : error LNK2001: unresolved external symbol _imp_JNI_CreateJavaVM@12
(I googled it but everything i try didn't work)
-
December 28th, 2013, 04:24 PM
#2
Re: How to Setup VOCE (Voice Recognition API) C++
Originally Posted by robi9011235
Tried to compile a sample file and it gives me the error:
Testing.obj : error LNK2001: unresolved external symbol _imp_JNI_CreateJavaVM@12
You're also supposed to give the name of the library to the linker, not just give the path where libraries are found. Nowhere in your description of what you did says anything about giving the name of the library to the linker.
Regards,
Paul McKenzie
-
December 28th, 2013, 04:32 PM
#3
Re: How to Setup VOCE (Voice Recognition API) C++
Originally Posted by Paul McKenzie
You're also supposed to give the name of the library to the linker, not just give the path where libraries are found. Nowhere in your description of what you did says anything about giving the name of the library to the linker.
Regards,
Paul McKenzie
I don't really get it.
How can I do that?
-
December 28th, 2013, 06:19 PM
#4
Re: How to Setup VOCE (Voice Recognition API) C++
Originally Posted by robi9011235
I don't really get it.
How can I do that?
I don't have VS in front of me right now, but the steps are something like go to project properties, select linker, then input then put in the name(s) of whatever libraries you need.
You can also just add it to the project by selecting project, insert existing item, or something close to that.
-
December 28th, 2013, 08:47 PM
#5
Re: How to Setup VOCE (Voice Recognition API) C++
Originally Posted by robi9011235
I don't really get it.
So how is the linker to know the name of the library it needs to open, find your functions, and link? A directory isn't going to give that information.
Linker->Input->Additional Dependencies
There is where you give the name of the library.
In Include Directories i added: C:\voce-0.9.1\src\c++, C:\Program * Files\Java\jdk1.7.0_45\include, C:\Program Files\Java\jdk1.7.0_45\include\win32
And what if in your source code, you never #included any of the files that are associated with VOCE? See the similarities? If you just give an #include path and never actually state in your source code to #include a file that is needed, you get a compiler error. Same here -- you never stated to the linker what library you want to link -- you only gave the path to where the library files are found.
Regards,
Paul McKenzie
Last edited by Paul McKenzie; December 28th, 2013 at 08:51 PM.
-
December 29th, 2013, 01:27 PM
#6
Re: How to Setup VOCE (Voice Recognition API) C++
Originally Posted by Paul McKenzie
So how is the linker to know the name of the library it needs to open, find your functions, and link? A directory isn't going to give that information.
Linker->Input->Additional Dependencies
There is where you give the name of the library.
And what if in your source code, you never #included any of the files that are associated with VOCE? See the similarities? If you just give an #include path and never actually state in your source code to #include a file that is needed, you get a compiler error. Same here -- you never stated to the linker what library you want to link -- you only gave the path to where the library files are found.
Regards,
Paul McKenzie
I did what you said. I put: (C:\voce-0.9.1\src\c++, C:\Program Files\Java\jdk1.7.0_45\include, C:\Program Files\Java\jdk1.7.0_45\include\win32) in
Linker -> Additional library directories and it still not working.
):
What about: "I didn't get what i suppose to do with C:\voce-0.9.1\lib everything there is winrars"
I really appreciate your help, thank you!
-
December 29th, 2013, 02:04 PM
#7
Re: How to Setup VOCE (Voice Recognition API) C++
Originally Posted by robi9011235
I did what you said. I put: (C:\voce-0.9.1\src\c++, C:\Program Files\Java\jdk1.7.0_45\include, C:\Program Files\Java\jdk1.7.0_45\include\win32) in
Linker -> Additional library directories and it still not working.
):
What about: "I didn't get what i suppose to do with C:\voce-0.9.1\lib everything there is winrars"
I really appreciate your help, thank you!
That's not what he said. He said you need to tell it specifically which .lib files.
-
December 29th, 2013, 02:07 PM
#8
Re: How to Setup VOCE (Voice Recognition API) C++
Originally Posted by GCDEF
That's not what he said. He said you need to tell it specifically which .lib files.
How do i do that?
I can't add filed to Linker->Additional Library Directories, only folders
-
December 29th, 2013, 02:13 PM
#9
Re: How to Setup VOCE (Voice Recognition API) C++
Originally Posted by robi9011235
How do i do that?
I can't add filed to Linker->Additional Library Directories, only folders
I already told you
-
December 29th, 2013, 02:25 PM
#10
Re: How to Setup VOCE (Voice Recognition API) C++
Originally Posted by GCDEF
I already told you
Oh now i get it!
It is compiling successfully, but there is a run-time error, saying it don't find jvm.dll
-
December 29th, 2013, 02:29 PM
#11
Re: How to Setup VOCE (Voice Recognition API) C++
Originally Posted by robi9011235
Oh now i get it!
It is compiling successfully, but there is a run-time error, saying it don't find jvm.dll
Does jvm.dll exiist?
-
October 1st, 2014, 07:22 AM
#12
Re: How to Setup VOCE (Voice Recognition API) C++
I'm having exactly the same issue. I have no experience with JNI.
Following the above steps, I have managed to reach the point that jvm.dll is needed.
I copied inside the folder where the .exe file is, but now I get the message that JVM cannot be initialized.
Any thoughts?
-
October 1st, 2014, 07:45 AM
#13
Re: How to Setup VOCE (Voice Recognition API) C++
Did you try to read about similar problems here?
Victor Nijegorodov
-
October 1st, 2014, 08:15 AM
#14
Re: How to Setup VOCE (Voice Recognition API) C++
Just did :P
I had to modify the system variables in order to work.
Thanks a lot!!
-
October 18th, 2014, 09:10 AM
#15
Re: How to Setup VOCE (Voice Recognition API) C++
Next, probably stupid, question :P
I try to initialize voce with the init() function, but it cannot find the grammar path. I' ve tried every possible way.
Absolute path, relative path according to the location of jar files, relative path according to my project location.
Nothing seems to work. Any help?
Last edited by SteveShady; October 18th, 2014 at 09:30 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|