How to Setup VOCE (Voice Recognition API) C++
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: How to Setup VOCE (Voice Recognition API) C++

  1. #1
    Join Date
    Dec 2013
    Posts
    6

    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)

  2. #2
    Join Date
    Apr 1999
    Posts
    27,423

    Re: How to Setup VOCE (Voice Recognition API) C++

    Quote Originally Posted by robi9011235 View Post
    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

  3. #3
    Join Date
    Dec 2013
    Posts
    6

    Re: How to Setup VOCE (Voice Recognition API) C++

    Quote Originally Posted by Paul McKenzie View Post
    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?

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    12,057

    Re: How to Setup VOCE (Voice Recognition API) C++

    Quote Originally Posted by robi9011235 View Post
    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.

  5. #5
    Join Date
    Apr 1999
    Posts
    27,423

    Re: How to Setup VOCE (Voice Recognition API) C++

    Quote Originally Posted by robi9011235 View Post
    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 07:51 PM.

  6. #6
    Join Date
    Dec 2013
    Posts
    6

    Re: How to Setup VOCE (Voice Recognition API) C++

    Quote Originally Posted by Paul McKenzie View Post
    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!

  7. #7
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    12,057

    Re: How to Setup VOCE (Voice Recognition API) C++

    Quote Originally Posted by robi9011235 View Post
    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.

  8. #8
    Join Date
    Dec 2013
    Posts
    6

    Re: How to Setup VOCE (Voice Recognition API) C++

    Quote Originally Posted by GCDEF View Post
    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

  9. #9
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    12,057

    Re: How to Setup VOCE (Voice Recognition API) C++

    Quote Originally Posted by robi9011235 View Post
    How do i do that?
    I can't add filed to Linker->Additional Library Directories, only folders
    I already told you

  10. #10
    Join Date
    Dec 2013
    Posts
    6

    Re: How to Setup VOCE (Voice Recognition API) C++

    Quote Originally Posted by GCDEF View Post
    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

  11. #11
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    12,057

    Re: How to Setup VOCE (Voice Recognition API) C++

    Quote Originally Posted by robi9011235 View Post
    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?

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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center