How to use microsoft speech sdk 5.1 in java application?

I download the speech sdk 5.1 from microsoft site,and want to use it in my java application,the following are the codes of the application(it uses boot.jar,swt.jar,jface.jar,runtime.jar,swt-win32-3101.dll) ,but gives me the exception,how should i do?it it is not supported by java,what others can i use?
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.internal.ole.win32.TYPEATTR;
import org.eclipse.swt.ole.win32.OLE;
import org.eclipse.swt.ole.win32.OleAutomation;
import org.eclipse.swt.ole.win32.OleControlSite;
import org.eclipse.swt.ole.win32.OleFrame;
import org.eclipse.swt.ole.win32.OleFunctionDescription;
import org.eclipse.swt.ole.win32.OlePropertyDescription;
import org.eclipse.swt.widgets.Shell;
public class Main
    public static void main(String[] args)
         args = new String[1];
         args[0] = "Sapi.SpVoice";
        if (args.length == 0)
            System.out.println("Usage: java Main <program id>");
            return;
        String progID = args[0];
        //progID = "word.Document.8";
        Shell shell = new Shell();
        OleFrame frame = new OleFrame(shell, SWT.NONE);
        OleControlSite site = null;
        OleAutomation auto = null;
        try
            site = new OleControlSite(frame, SWT.NONE, progID);
            auto = new OleAutomation(site);
        catch (SWTException ex)
            System.out.println("Unable to open type library for " + progID);
            return;
      TYPEATTR typeattr = auto.getTypeInfoAttributes();
}it gives me the error:
org.eclipse.swt.SWTException: Failed to create Ole Client. result = -2147221164
Unable to open type library for Sapi.SpVoice
at org.eclipse.swt.ole.win32.OLE.error(OLE.java:302)
at org.eclipse.swt.ole.win32.OleControlSite.<init>(OleControlSite.java:100)
Main.main(Main.java:43)

Hello chengshwu ,
Have heard of JNI ?
Please check this.
http://danadler.com/jacob/

Similar Messages

  • What happened to Microsoft.Speech SDK?, i´m not seeing any update on this.

    Hi Microsoft. can you please tell me what happened to the Microsoft.Speech SDK ?. i am currently working  in a big Project using this technology (SRGS, GRXML, PLS, etc) and i am worried about the support on this.
    thanks in advance for your answer.

    Hi Microsoft. can you please tell me what happened to the Microsoft.Speech SDK ?. i am currently working  in a big Project using this technology (SRGS, GRXML, PLS, etc) and i am worried about the support on this.
    thanks in advance for your answer.
    If there is no quick  answer for this, can you please confirm if Oxfords's Speech API can support SRGS compiled gramar usage, as well as PLS and Lex Files?

  • How to use Microsoft DateTime Picker ActiveX control in Forms 6i?

    Does anyone have idea on how to use Microsoft Date-Time Picker ActiveX component in Forms 6i? Please give me coding examples for using this control to retrieve & store date at the backend.
    Regards

    when u load activex (spreedsheet) the corresponting menu also u can see when u run through which also you can set the attribute values
    im also check the same it is working
    sorry i saw it on design time
    kansih
    Edited by: Kanish on Apr 28, 2009 2:54 AM

  • Using MicroSoft. XMLHttp in jsp or  java

    Hi,
    Can anybody tell me is it good to use
    MicroSoft. XMLHttp in jsp and java programs for connectint to remote url and sending xml data..(in java script fucntions)
    regards,

    By default, JSTL variables are kept in servlet
    attributes. Default is to store it in the page
    context. You can make it request/session/application
    scope as required by an attribute of the set tag.Hi there,
    Can anyone advise how to access JSP variables in JSTL?
    Can it be done as the same method through request/session/application scope?
    Thnks...

  • How to use Query Builder as a component inside our applications?

    I am very new to Apex, but I loved it until now :)
    After my first experience I am thinking to advice Apex as an Oracle database reporting environment to some of our marketing and sales guys. These guys are familiar to basic SQL and table, index concepts and their need is to create dynamic reports, take their output to excel and email these reports all around the company :)
    My first question is can Apex 3.1 work with 9.2 - 10.1 - 10.2 and 11.1?
    My second question is how can I open the Query Builder inside the Create Region>SQL Report wizard to my users inside a custom user defined form?
    My third question is if the answer of second question is it is not possible, then anyone can advice on alternatives for this kind of a need with Apex?
    My last question is how Apex can handle a distributed database environment, like Java applications can it open several database connections as needed?
    Thank you.

    Hello,
    My first question is can Apex 3.1 work with 9.2 - 10.1 - 10.2 and 11.1?Correct. That's said in the installation guide.
    My second question is how can I open the Query Builder inside the Create Region>SQL Report wizard to my users inside a custom user defined form?This does not yet exist out of the box. You can have a look how Oracle did it and try to mimic it in your own application.
    My third question is if the answer of second question is it is not possible, then anyone can advice on alternatives for this kind of a need with Apex?Import app 4500 in your own workspace. On page 1002 you should find the query builder.
    Again you can't just run this, you would need to make customizations to it. Alternatively you can add just a textarea on a page where you can run SQL statements from. But I guess you want to have the graphical display?
    My last question is how Apex can handle a distributed database environment, like Java applications can it open several database connections as needed?APEX is living in the Oracle database. So everything inside that database you can potentially work with. If you need data from other sources you can use a database link or hytrogenous connectivity. Basically if you can do it from the Oracle database, you can also do it from within APEX.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://www.apex-evangelists.com/
    -- http://www.apexblogs.info/

  • How to use line wrapping and line spacing in java?how to use line wrapping

    how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?

    Hello,
    You should post your question at:
    http://java.forum.sun.com
    Thanks
    - Rose

  • How to use line wrapping and line spacing in java?

    how to use line wrapping and line spacing in java?

    Hi,
    This is explained in the java Tutorial. Please see the link:
    http://java.sun.com/docs/books/tutorial/i18n/text/line.html
    and find some sample examples.
    Hope this helps,
    --Sun/DTS                                                                                                                                                                                                                                                                                                                                                                                       

  • How can i build RPMs file for my own Java Application?

    How can i build RPMs file for my own Java Application?....I have my own directory that contains all Java Source files and some files that my Application required....I want to build RPMs file like a install File to Linux System, Now my OS is Linux Fedora core 1.....How can i do this?

    I think that in order to create a RPM, you'd need to
    use some C.Nope - the RPM is all about packaging and the "magic" x.spec file. You can have anything you want in the RPM, but you have to use RPM tools to build the .rpm file. One of the features is that you can also indicate (via "install" scripts) modifications to other files or the filesystem to support the installation of whatever's in the RPM.

  • Can i use single database connection in a hole java application?

    can i use single database connection in a hole java application?.I have so many forms to use database connection.

    Theoretically you can. Not only theoretically. I've seen lots of application which only uses one database connection (they were using, oracle or mysql)
    The first reply given here assumed that the answer to
    your question depends only on the design of your
    application. That is not true.Yes it's true. Nothing in the original questions says that you aren't allowed to open or close the single connection that you have. It's looks more like the OP is interested in sharing a connection (i.e having a singleton or a connection pool with only one connection)
    It does also depend on the behaviour of the database
    in the background.
    Most databases have a time out for connections that
    are idle Not a problem. Most implementations of connection pools and applications which keeps a connection open have a timer which calls e.g. select * from dual (if you are using oracle) when the connection has been idle for X minutes.
    (some, like db2 on z/OS, even cancel
    connections, that are not idle, if they are open a
    certain amount of time or have reached a given limit
    of cpu seconds.)You would also have that problem if you had a connection pool with several connections.
    In essence: If you have no control over the time
    your application runs (and therefore your connection
    is open) or over type or the configuration of the
    database you are accessing, you can't do it.See above.
    The closest thing to what you want would be using
    PooledConnections, iif those are supported for the
    database you want to access.Not true.
    Kaj

  • How to use Microsoft Word's Find and Replace with HTML tags?

    Hello to all!
    I'm trying to figure out how to use the find and replace function in Word to replace html tags. I'd like to be able to change something like this:
    <span class="B01-K-ITAL">random text</span>
    To something like this:
    <em>random text</em>
    I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly.
    Anyone able to lend a hand?

    Here is my latest regular expression with Perl.   I think it matches the spirit of the request in the original post.
    Note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.
    perl -0660pe 's^<[sS][pP][aA][nN]\s+class="B01-K-ITAL"\s*>(.*?)</[sS][pP][aA][nN]>^<em>$1</em>^gs' i.html >|o.html
    input text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <span class="B01-K-ITAL">#1 one line</span> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <span class="B01-K-ITAL">#2 don't be greedy</span> <span class="B01-K-ITAL">$3 multiline text</span> <span class="B01-K-ITAL">#4 multiline tag. I believe html allow a carriage return in white space of tags</span> <span class="B01-K-ITAL">#5 split after the class tag. optional white space</span> <sPan class="B01-K-ITAL">#6 mixed case tag</Span> <p>no text #7</p><span class="B01-K-ITAL"></span> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>
    output text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <em>#1 one line</em> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <em>#2 don't be greedy</em> <em>$3 multiline text</em> <em>#4 multiline tag. I believe html allow a carriage return in white space of tags</em> <em>#5 split after the class tag. optional white space</em> <em>#6 mixed case tag</em> <p>no text #7</p><em></em> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>

  • How to use SQl server 2005's SQLXMLBulkLoad with JAVA

    Hi All,
    I am in a big problem identifying how to use xml bulk insert functionality of sql server 2005 with java.
    I need to enter millions of data into the sql server 2005 database.
    All the material i saw on net includes vb script or asp.net sripts to do so.
    Somebody please tell how I can do this with JAVA.
    Thanks.

    In this forum we commonly discuss connections from Oracle to foreign databases. When you want to connect with your SQL Server to Oracle it would be better to ask that in a Microsoft forum as they support their LINKED SERVER mechanism.
    The linked server set up is for example described in the Microsoft knowledge base as:
    280106 - HOW TO: Set Up and Troubleshoot a Linked Server to Oracle in SQL Server
    In newer SQl Server releases the name changed see for example:
    How to run a SQL Server 2005 Integration Services package as a SQL Server Agent job step
    View products that this article applies to.
    Article ID : 912911
    As you can see they are commonly using OLEDB driver. So you might have to install Oracle's OLEDB driver as well. Else you might think about using OLEDB to ODBC bridge

  • How to use two different ojdbc14.jar for two web application.

    Hi,
    I have two web application running in same tomcat, I need to use the two different ojdbc14.jar for two application, now both are taking the jars from tomcat common/lib directory, I tried copying the new ojdbc14.jar in web-inf/lib folder of one application, but it is not working.
    Could you please let me know whether this will take the jar from tomcat by befault or from web-inf, and a solution how to proceed with this.
    Thanks in advance.

    Yes, I tried removing the jars from common/lib, but as the connection string is mentioned inside the server.xml it is showing db connection error while trying to connect to the database

  • How to use MICR fonts in Adobe forms (webdynpro java

    Hi,
          We have a requirement where we need to print some MICR codes (for checks) through Adobe Forms.
    I have installed some true type MICR fonts in windows and Adobe Font Manager (in ADS) as well.
    It is visible in the Adobe Form design time (Font palette) and when I use the font for text, it is visible in preview too. But when I run the web dynpro application, in the online form it is converted into Standard font (Times new Roman).
    Is there anyway to handle this issue.
    Please let me know.
    I am using NWDS 7.0.1
    Adobe Live cycle designer 7.1
    SAP NW 2004s SP14
    Thank you,
    Vasu

    Check this forum post (though that is for 6i, it would be of helpful for you)
    How to use unicode fonts in Oracle forms 10g?
    -Arun

  • How to use the google search from inside a java program

    Hi guys
    How can i use google search in my java program?
    What will be the type of the reply i get back from google?
    Thanks in advance
    [http://javamilestone.blogspot.com/|http://javamilestone.blogspot.com/]

    Hi,
    You have here some examples about how to make search on google from a Java application.
    The type of reply is JSON
    Here some documentation about it:
    [http://code.google.com/apis/ajaxsearch/documentation/#fonje|http://code.google.com/apis/ajaxsearch/documentation/#fonje]
    And here some snippets:
    [http://code.google.com/apis/ajaxsearch/documentation/#fonje_snippets|http://code.google.com/apis/ajaxsearch/documentation/#fonje_snippets]
    Regards,
    David.

  • How to use Try Catch Block in ABAP Like JAVA

    Hi Experts,
       I am using BAPI to post MIGO in one of my application. If the MIGO is successfully gets posted then BAPI returns no message, but if there is some error in posting then it returns an error message. Now I want to print that error message in catch block by calling method RAISE_ERROR_MESSAGE. How to use try catch block in ABAP. Please suggest with example.
    Thanks and Regards.
    Vaibhav Tiwari.

    Hi Vaibhav
    You may not catch exceptions returned by function module using try endtry block.
    It works well with the exception returned by methods.
    In case of function modules or BAPI what u can do is to check sy-subrc returned and give message accordingly. If it returns a structure like bapireturn then display message returned.
    in case of exception returned by a method,  do it like this...
    data: excep type cx_root.
    data: v_str type string.
    try.
    *any method call or division by zero (for ex)
    catch cx_root into excep.
    endtry.
    if  excep is not initial.
    CALL METHOD   excep->if_message~get_text
      receiving
        RESULT = v_str.
    endif.
    *display the value returned in v_str on screen

Maybe you are looking for