Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse compile problem
Eclipse compile problem [message #505619] Sun, 03 January 2010 13:35 Go to next message
Eclipse UserFriend
Hello

i am new in ubuntu. i am trying to compile some java file using Eclipse program. But it is generating this errors:

08:29.335 SEVERE microphone couldn't find suitable target audio format
in edu.cmu.sphinx.frontend.util.Microphone:initialize-microphon e

08:29.263 SEVERE microphone microphone unavailable no Clip available
in edu.cmu.sphinx.frontend.util.Microphone:getAudioLine-microph one

Cannot start microphone.

08:29.264 SEVERE microphone Can't find microphone
in edu.cmu.sphinx.frontend.util.Microphone:open-microphone


but my microphone works properly. If i compile this file in Opensus operating system it is working fine but in Ubuntu it is not working. But i want to run this file in Ubuntu.

/*
* Copyright 1999-2004 Carnegie Mellon University.
* Portions Copyright 2004 Sun Microsystems, Inc.
* Portions Copyright 2004 Mitsubishi Electric Research Laboratories.
* All Rights Reserved. Use is subject to license terms.
*
* See the file "license.terms" for information on usage and
* redistribution of this file, and for a DISCLAIMER OF ALL
* WARRANTIES.
*
*/

package demo.sphinx.hellodigits;

import edu.cmu.sphinx.frontend.util.Microphone;
import edu.cmu.sphinx.recognizer.Recognizer;
import edu.cmu.sphinx.result.Result;
import edu.cmu.sphinx.util.props.ConfigurationManager;
import edu.cmu.sphinx.util.props.PropertyException;

import java.io.File;
import java.io.IOException;
import java.net.URL;


/**
* A simple HelloDigits demo showing a simple speech application
* built using Sphinx-4. This application uses the Sphinx-4 endpointer,
* which automatically segments incoming audio into utterances and silences.
*/
public class HelloDigits {

/**
* Main method for running the HelloDigits demo.
*/
public static void main(String[] args) {
try {
URL url;
if (args.length > 0) {
url = new File(args[0]).toURI().toURL();
} else {
url = HelloDigits.class.getResource("hellodigits.config.xml");
}

ConfigurationManager cm = new ConfigurationManager(url);

Recognizer recognizer = (Recognizer) cm.lookup("recognizer");
Microphone microphone = (Microphone) cm.lookup("microphone");


/* allocate the resource necessary for the recognizer */
recognizer.allocate();

/* the microphone will keep recording until the program exits */
if (microphone.startRecording()) {

System.out.println
("Say any digit(s): e.g. \"two oh oh four\", " +
"\"three six five\".");

while (true) {
System.out.println
("Start speaking. Press Ctrl-C to quit.\n");

/*
* This method will return when the end of speech
* is reached. Note that the endpointer will determine
* the end of speech.
*/
Result result = recognizer.recognize();

if (result != null) {
String resultText = result.getBestResultNoFiller();
System.out.println("You said: " + resultText + "\n");
} else {
System.out.println("I can't hear what you said.\n");
}
}
} else {
System.out.println("Cannot start microphone.");
recognizer.deallocate();
System.exit(1);
}
} catch (IOException e) {
System.err.println("Problem when loading HelloDigits: " + e);
e.printStackTrace();
} catch (PropertyException e) {
System.err.println("Problem configuring HelloDigits: " + e);
e.printStackTrace();
} catch (InstantiationException e) {
System.err.println("Problem creating HelloDigits: " + e);
e.printStackTrace();
}
}
}



please help me. i have to do a project on this

[Updated on: Wed, 06 January 2010 15:49] by Moderator

Re: Eclipse compile problem [message #505647 is a reply to message #505619] Mon, 04 January 2010 01:29 Go to previous messageGo to next message
Eclipse UserFriend
nasif2000@gmail.com wrote:
> Hello
>
> i am new in ubuntu. i am trying to compile some java file using Eclipse
> program. But it is generating this errors:
>
> 11:54.768 SEVERE microphone couldn't find suitable target audio format
> in edu.cmu.sphinx.frontend.util.Microphone:initialize-microphon e
> 11:54.246 SEVERE microphone microphone unavailable no Clip available
> in edu.cmu.sphinx.frontend.util.Microphone:getAudioLi ne-microphone
> Cannot start microphone.
>
> but my microphone works properly.
>
> please help me. i have to do a project on this
>


It sounds like it is compiling okay, but having trouble when you try to run it.

What steps have you tried to debug it?

What part of the code is yours, and what are libraries that you are using? You
have not provided enough information for anybody to give you much help.
Re: Eclipse compile problem [message #506769 is a reply to message #505647] Sat, 09 January 2010 15:05 Go to previous message
Eclipse UserFriend
any more help or suggestions please
Previous Topic:Eclipse builder problem
Next Topic:JSP editor problem [CLOSED]
Goto Forum:
  


Current Time: Mon Mar 24 16:19:28 EDT 2025

Powered by FUDForum. Page generated in 0.04119 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top