I want to execute and use the Win7 Speech Recognition with Java. How can I open it?
I tried to open it with "Runtime.getRuntime().exec(" ");" but I couldn't find a command to open it. How can I use the speech recognition once I opened it with commands in Java?
I have been working with java for some time now.. I wish to develop a stand alone application, which can recognize voice and perform actions accordingly. The issue is Oracle does not directly provide any support here... there are 3rd party applications that implement the java speech api.. I am not finding these 3rd party api's, even if i do they have a few lib jar files missing...
In Java i am trying to convert the "speech to Text", i search and find some idea about "sphinx4" api.But my problem is unable to convert text while i speaking continues, & we should mention all words in GRAMMAR file..,I want to convert speech to Text continually like doing in android application, without pre-mention the words in GRAMMAR file.My doubt is, Is any available API ? & How to complete my requirement?..,
my idea is auto recognize when i put image like survey and that survey has shape box and it random area location and some shape box also character and number and can generated data that recognize in csv file.
I have created a blackjack playing Lego NXT robot using the Lejos NXJ playform. I thought it would be great if my robot could respond to voice commands, so I installed sphinx and have the HelloWorld demo up and running in eclipse.All I need my robot to respond to is "Stick" and "Twist". I cant seem to find any tutorials for creating my own recognition program. Am I able to modify the HelloWorld demo code to enable it to recognise "Stick" and "Twist" voice files?.
I am making a program, where the user answers 3 questions and then I add the number of correct answers in to the (int) numberofcorrect variable, then I want to print the results, and no matter how many correct, the program executes first the correct if statement, then the else statement.
Eg: I have 2 correct it will print:
"Grade B, 2 of 3 "
"You failed the test"
Why does it do that? How can I change my code so the else statement dosent print if one of the if statments is allready printed?I want to know how to not execute the else statement, if one of the if statements have allready been executed.Below is my current code for this problem:
if (numberofcorrect == 3){ System.out.println("Grade A, full score");} if (numberofcorrect == 2){ System.out.println("Grade B, 2 of 3 ");} if (numberofcorrect ==1) { System.out.println("Grade C, 1 of 3");} else { System.out.println("You failed the test"); }
I want to execute my jsp code to compare two dates after every 10 seconds if user enter date and current sys date are equal it will send the mail to the user automatically. Below is my jsp code
this if condition i want to check the date after every 10 seconds and when two dates are equal it will send the mail using below mail code
if(ExpcReDt.compareTo(dateStr)>0) { out.println("Expected return date is greater than current date"); } else if(ExpcReDt.compareTo(dateStr)==0)
//Main method public static void main(String args[])throws IOException{ boolean runProgram = true; Scanner keyboard = new Scanner(System.in); //runs program while runProgram is true while (runProgram){
public class Main { private static void foo(Integer a) { System.out.println("Integer"); } private static void foo(long a) { System.out.println("long");
[Code] ....
This code prints long. Why is that? How did compiler decided that it likes long version of foo() method the most. If I had to guess I'd pick int... or possibly Integer as they are most similiar to what was passed. But why long?
I am unable to run this java mail code, whats the error!!
public class Class1 { final String senderEmailID = "from@gmail.com"; final String senderPassword = "password"; final String emailSMTPserver = "smtp.gmail.com"; final String emailServerPort = "465"; String receiverEmailID = null;
[Code] ...
I get an error as this
javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465, response: -1 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1949) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:654) at javax.mail.Service.connect(Service.java:317)
Question : How to execute batch file & .exe file using jsp servlet?I am giving input for blast in the FASTA format. After that i wants to make the sequence.FASTA file in my project folder. And I wants to execute batch file with parameters as blastp.exe file, sequence. FASTA file, database files, output file.
There is no problem in the file creation of sequence.FASTA
ERROR IN: the batch file is not execute, So the I am not able to get the output file for display.
ERROR is : java.io.FileNotFoundException: D:vaibhav_workspace.metadata.pluginsorg.eclipse.wst.server.core mp4wtpwebapps oxin-dataoutputprotein.txt (The system cannot find the file specified)
Technologies Used :JSP,Servlet,Process-builder
I have the following code as :
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out=response.getWriter(); String values=request.getParameter("t1"); ServletContext servletContext = request.getSession().getServletContext(); servletContext = request.getSession().getServletContext(); String path="//sequence.FASTA"; /*file is created in getRealPath()*/
There are multiple .CSV files (each file has multiple rows and columns). I need to fetch data from all the files and find MEDIAN of the values for each column and do further calculations. Suppose there are 3 files, i need to find the MEDIAN of column 1 in file1, MEDIAN of column 1 in file2, MEDIAN of column 1 in file3. Below code just fetch data from one file.
I have few queries regarding compiling v/s execution of a java program. Suppose I have a Main Class which is referring to class Test which is present in JarA. Now, at compile time, this jar JarA must be present in classpath/buildpath. So, what actually is the action performed by the compiler by referring to this jar?
Now, at runtime also, this jar should be present to execute the Main class. Is this correct? If yes, then what is the action performed by JRE when it refers to this class at runtime? WOn't all the dependencies be resolved at compile time only?
Please enter 1 if your package is a letter and 2 if your package is a box 2 Please enter weight in pounds (Example: 1.2): 1.2 Please enter your shipping service option: Press 1 for Next Day Priority: Press 2 for Next Day Standard: Press 3 for Two Day Shipping: 1 7.00
If I comment out the else statement on the last line of code I get the following output:
Please enter 1 if your package is a letter and 2 if your package is a box 2 Please enter weight in pounds (Example: 1.2): 1.2 Please enter your shipping service option: Press 1 for Next Day Priority: Press 2 for Next Day Standard: Press 3 for Two Day Shipping: 1 13.75
What I want to happen is the code under the first comment to to execute if true, or go to the code under the next comments and execute if that statement is true and if that is not true I want the last block of code to execute underneath the last comments.
I need executing shell script from Java program. For example i have start.sh script in /tmp/start.sh folder of unix server. I want to execute shell script from local java code.