通过eclipse构建时sphinx中的编译错误

时间:2014-01-14 06:52:29

标签: eclipse build compiler-errors sphinx4

我正在尝试使用eclipse IDE构建sphinx源代码。 但是当我尝试运行build.xml文件时它会失败。这导致100个编译错误。 有人可以帮忙吗?

Buildfile: C:\Users\vasu\workspace\Sphinx-4\build.xml

all:

check_jsapi_default_present:

copy_jsapi_jar:

check_jsapi_jar_present:

issue_jsapi_warning:

set_patternset_to_compile:

set_patternset_to_doc:

handle_jsapi:

compile_src:

   [javac] Compiling 32 source files to C:\Users\vasu\workspace\Sphinx-4\bld

   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseAudioManager.java:21: error: BaseAudioManager is not abstract and does not override abstract method isSameChannel(AudioManager) in AudioManager

   [javac] public class BaseAudioManager implements AudioManager {

   [javac]        ^

   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:107: error: waitEngineState(long) in BaseEngine cannot implement waitEngineState(long) in Engine
   [javac]     public void waitEngineState(long state)
   [javac]                 ^
   [javac]   return type void is not compatible with long
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:264: error: resume() in BaseEngine cannot implement resume() in Engine
   [javac]     public void resume() throws AudioException, EngineStateError {
   [javac]                 ^
   [javac]   return type void is not compatible with boolean
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:379: error: constructor EngineEvent in class EngineEvent cannot be applied to given types;
   [javac]                 new EngineEvent(
   [javac]                 ^
   [javac]   required: Engine,int,long,long,Throwable
   [javac]   found: BaseEngine,int,long,long
   [javac]   reason: actual and formal argument lists differ in length
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:399: error: cannot find symbol
   [javac]             el.engineAllocated(event);
   [javac]               ^
   [javac]   symbol:   method engineAllocated(EngineEvent)
   [javac]   location: variable el of type EngineListener
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:417: error: constructor EngineEvent in class EngineEvent cannot be applied to given types;
   [javac]                 new EngineEvent(
   [javac]                 ^
   [javac]   required: Engine,int,long,long,Throwable
   [javac]   found: BaseEngine,int,long,long
   [javac]   reason: actual and formal argument lists differ in length
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:437: error: cannot find symbol
   [javac]             el.engineAllocatingResources(event);
   [javac]               ^
   [javac]   symbol:   method engineAllocatingResources(EngineEvent)
   [javac]   location: variable el of type EngineListener
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:454: error: constructor EngineEvent in class EngineEvent cannot be applied to given types;
   [javac]                 new EngineEvent(
   [javac]                 ^
   [javac]   required: Engine,int,long,long,Throwable
   [javac]   found: BaseEngine,int,long,long
   [javac]   reason: actual and formal argument lists differ in length
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:474: error: cannot find symbol
   [javac]             el.engineDeallocated(event);
   [javac]               ^
   [javac]   symbol:   method engineDeallocated(EngineEvent)
   [javac]   location: variable el of type EngineListener
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:492: error: constructor EngineEvent in class EngineEvent cannot be applied to given types;
   [javac]                 new EngineEvent(
   [javac]                 ^
   [javac]   required: Engine,int,long,long,Throwable
   [javac]   found: BaseEngine,int,long,long
   [javac]   reason: actual and formal argument lists differ in length
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:513: error: cannot find symbol
   [javac]             el.engineDeallocatingResources(event);
   [javac]               ^
   [javac]   symbol:   method engineDeallocatingResources(EngineEvent)
   [javac]   location: variable el of type EngineListener
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:529: error: constructor EngineEvent in class EngineEvent cannot be applied to given types;
   [javac]                 new EngineEvent(
   [javac]                 ^
   [javac]   required: Engine,int,long,long,Throwable
   [javac]   found: BaseEngine,int,long,long
   [javac]   reason: actual and formal argument lists differ in length
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:549: error: cannot find symbol
   [javac]             el.enginePaused(event);
   [javac]               ^
   [javac]   symbol:   method enginePaused(EngineEvent)
   [javac]   location: variable el of type EngineListener
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:565: error: constructor EngineEvent in class EngineEvent cannot be applied to given types;
   [javac]                 new EngineEvent(
   [javac]                 ^
   [javac]   required: Engine,int,long,long,Throwable
   [javac]   found: BaseEngine,int,long,long
   [javac]   reason: actual and formal argument lists differ in length
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\BaseEngine.java:585: error: cannot find symbol
   [javac]             el.engineResumed(event);
   [javac]               ^
   [javac]   symbol:   method engineResumed(EngineEvent)
   [javac]   location: variable el of type EngineListener
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\EngineMonitor.java:62: error: cannot find symbol
   [javac]         engine.addEngineListener(getEngineListener());
   [javac]               ^
   [javac]   symbol:   method addEngineListener(EngineListener)
   [javac]   location: variable engine of type Engine
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseGrammar.java:23: error: BaseGrammar is not abstract and does not override abstract method setActivatable(boolean) in Grammar
   [javac] public class BaseGrammar
   [javac]        ^
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseGrammar.java:49: error: cannot find symbol
   [javac]         activationMode = RECOGNIZER_FOCUS;
   [javac]                          ^
   [javac]   symbol:   variable RECOGNIZER_FOCUS
   [javac]   location: class BaseGrammar
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseGrammar.java:93: error: cannot find symbol
   [javac]         if ((mode != GLOBAL)
   [javac]                      ^
   [javac]   symbol:   variable GLOBAL
   [javac]   location: class BaseGrammar
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseGrammar.java:94: error: cannot find symbol
   [javac]                 && (mode != RECOGNIZER_MODAL)
   [javac]                             ^
   [javac]   symbol:   variable RECOGNIZER_MODAL
   [javac]   location: class BaseGrammar
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseGrammar.java:95: error: cannot find symbol
   [javac]                 && (mode != RECOGNIZER_FOCUS)) {
   [javac]                             ^
   [javac]   symbol:   variable RECOGNIZER_FOCUS
   [javac]   location: class BaseGrammar
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseGrammar.java:186: error: cannot find symbol
   [javac]          rl.trainingInfoReleased(event);
   [javac]            ^
   [javac]   symbol:   method trainingInfoReleased(ResultEvent)
   [javac]   location: variable rl of type ResultListener
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:715: error: constructor RecognizerEvent in class RecognizerEvent cannot be applied to given types;
   [javac]      SpeechEventUtilities.postSpeechEvent(this, new RecognizerEvent(this,
   [javac]                                                 ^
   [javac]   required: Recognizer,int,long,long,Throwable,GrammarException,long
   [javac]   found: BaseRecognizer,int,long,long,GrammarException
   [javac]   reason: actual and formal argument lists differ in length
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:729: error: cannot find symbol
   [javac]              ((RecognizerListener) el).changesCommitted(event);
   [javac]                                       ^
   [javac]   symbol:   method changesCommitted(RecognizerEvent)
   [javac]   location: interface RecognizerListener
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:739: error: cannot find symbol
   [javac]              RecognizerEvent.FOCUS_GAINED, oldState, newState, null));
   [javac]                             ^
   [javac]   symbol:   variable FOCUS_GAINED
   [javac]   location: class RecognizerEvent
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:752: error: cannot find symbol
   [javac]              ((RecognizerListener) el).focusGained(event);
   [javac]                                       ^
   [javac]   symbol:   method focusGained(RecognizerEvent)
   [javac]   location: interface RecognizerListener
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:762: error: cannot find symbol
   [javac]              RecognizerEvent.FOCUS_LOST, oldState, newState, null));
   [javac]                             ^
   [javac]   symbol:   variable FOCUS_LOST
   [javac]   location: class RecognizerEvent
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:775: error: cannot find symbol
   [javac]              ((RecognizerListener) el).focusLost(event);
   [javac]                                       ^
   [javac]   symbol:   method focusLost(RecognizerEvent)
   [javac]   location: interface RecognizerListener
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:785: error: constructor RecognizerEvent in class RecognizerEvent cannot be applied to given types;
   [javac]              new RecognizerEvent(this,
   [javac]              ^
   [javac]   required: Recognizer,int,long,long,Throwable,GrammarException,long
   [javac]   found: BaseRecognizer,int,long,long,<null>
   [javac]   reason: actual and formal argument lists differ in length
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:800: error: cannot find symbol
   [javac]              ((RecognizerListener) el).recognizerProcessing(event);
   [javac]                                       ^
   [javac]   symbol:   method recognizerProcessing(RecognizerEvent)
   [javac]   location: interface RecognizerListener
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:811: error: cannot find symbol
   [javac]                      RecognizerEvent.RECOGNIZER_SUSPENDED, oldState,
   [javac]                                     ^
   [javac]   symbol:   variable RECOGNIZER_SUSPENDED
   [javac]   location: class RecognizerEvent
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:825: error: cannot find symbol
   [javac]              ((RecognizerListener) el).recognizerSuspended(event);
   [javac]                                       ^
   [javac]   symbol:   method recognizerSuspended(RecognizerEvent)
   [javac]   location: interface RecognizerListener
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:867: error: cannot find symbol
   [javac]          String grammarName = ruleGrammar.getName();
   [javac]                                          ^
   [javac]   symbol:   method getName()
   [javac]   location: variable ruleGrammar of type RuleGrammar
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:925: error: cannot find symbol
   [javac]      for (RuleName ruleName : grammar.listImports()) {
   [javac]                                      ^
   [javac]   symbol:   method listImports()
   [javac]   location: variable grammar of type RuleGrammar
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:959: error: cannot find symbol
   [javac]          String rule = grammar.getRuleInternal(ruleName).toString();
   [javac]                               ^
   [javac]   symbol:   method getRuleInternal(String)
   [javac]   location: variable grammar of type RuleGrammar
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:1005: error: cannot find symbol
   [javac]      if (!grammar.isEnabled()) {
   [javac]                  ^
   [javac]   symbol:   method isEnabled()
   [javac]   location: variable grammar of type Grammar
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:1007: error: cannot find symbol
   [javac]      } else if (grammar.getActivationMode() == Grammar.GLOBAL) {
   [javac]                                                       ^
   [javac]   symbol:   variable GLOBAL
   [javac]   location: interface Grammar
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:1009: error: cannot find symbol
   [javac]      } else if (testEngineState(FOCUS_ON)) {
   [javac]                                 ^
   [javac]   symbol:   variable FOCUS_ON
   [javac]   location: class BaseRecognizer
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:1010: error: cannot find symbol
   [javac]          if (grammar.getActivationMode() == Grammar.RECOGNIZER_MODAL) {
   [javac]                                                    ^
   [javac]   symbol:   variable RECOGNIZER_MODAL
   [javac]   location: interface Grammar
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:1083: error: cannot find symbol
   [javac]      case RecognizerEvent.FOCUS_GAINED:
   [javac]                          ^
   [javac]   symbol:   variable FOCUS_GAINED
   [javac]   location: class RecognizerEvent
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:1086: error: cannot find symbol
   [javac]      case RecognizerEvent.FOCUS_LOST:
   [javac]                          ^
   [javac]   symbol:   variable FOCUS_LOST
   [javac]   location: class RecognizerEvent
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRecognizer.java:1092: error: cannot find symbol
   [javac]      case RecognizerEvent.RECOGNIZER_SUSPENDED:
   [javac]                          ^
   [javac]   symbol:   variable RECOGNIZER_SUSPENDED
   [javac]   location: class RecognizerEvent
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:28: error: BaseRuleGrammar is not abstract and does not override abstract method getRoot() in RuleGrammar
   [javac] public class BaseRuleGrammar extends BaseGrammar implements RuleGrammar,
   [javac]        ^
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:96: error: inconvertible types
   [javac]         if (rule instanceof RuleAlternatives) {
   [javac]             ^
   [javac]   required: RuleAlternatives
   [javac]   found:    Rule
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:97: error: inconvertible types
   [javac]             RuleAlternatives ruleAlternatives = (RuleAlternatives) rule;
   [javac]                                                                    ^
   [javac]   required: RuleAlternatives
   [javac]   found:    Rule
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:99: error: cannot find symbol
   [javac]             for (Rule r : ruleAlternatives.getRules()) {
   [javac]                                           ^
   [javac]   symbol:   method getRules()
   [javac]   location: variable ruleAlternatives of type RuleAlternatives
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:112: error: inconvertible types
   [javac]         if (rule instanceof RuleSequence) {
   [javac]             ^
   [javac]   required: RuleSequence
   [javac]   found:    Rule
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:113: error: inconvertible types
   [javac]             RuleSequence ruleSequence = (RuleSequence) rule;
   [javac]                                                        ^
   [javac]   required: RuleSequence
   [javac]   found:    Rule
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:115: error: cannot find symbol
   [javac]             for (Rule r : ruleSequence.getRules()) {
   [javac]                                       ^
   [javac]   symbol:   method getRules()
   [javac]   location: variable ruleSequence of type RuleSequence
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:121: error: inconvertible types
   [javac]         if (rule instanceof RuleCount) {
   [javac]             ^
   [javac]   required: RuleCount
   [javac]   found:    Rule
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:122: error: inconvertible types
   [javac]             RuleCount ruleCount = (RuleCount) rule;
   [javac]                                               ^
   [javac]   required: RuleCount
   [javac]   found:    Rule
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:123: error: cannot find symbol
   [javac]             return new JSGFRuleCount(convert(ruleCount.getRule()), ruleCount
   [javac]                                                       ^
   [javac]   symbol:   method getRule()
   [javac]   location: variable ruleCount of type RuleCount
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:124: error: cannot find symbol
   [javac]                     .getCount());
   [javac]                     ^
   [javac]   symbol:   method getCount()
   [javac]   location: variable ruleCount of type RuleCount
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:127: error: inconvertible types
   [javac]         if (rule instanceof RuleTag) {
   [javac]             ^
   [javac]   required: RuleTag
   [javac]   found:    Rule
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:128: error: inconvertible types
   [javac]             RuleTag ruleTag = (RuleTag) rule;
   [javac]                                         ^
   [javac]   required: RuleTag
   [javac]   found:    Rule
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:129: error: cannot find symbol
   [javac]             return new JSGFRuleTag(convert(ruleTag.getRule()), ruleTag.getTag());
   [javac]                                                   ^
   [javac]   symbol:   method getRule()
   [javac]   location: variable ruleTag of type RuleTag
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:132: error: inconvertible types
   [javac]         if (rule instanceof RuleToken) {
   [javac]             ^
   [javac]   required: RuleToken
   [javac]   found:    Rule
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:133: error: inconvertible types
   [javac]             RuleToken ruleToken = (RuleToken) rule;
   [javac]                                               ^
   [javac]   required: RuleToken
   [javac]   found:    Rule
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:175: error: no suitable constructor found for RuleAlternatives(Rule[],float[])
   [javac]             return new RuleAlternatives(subrules, weights);
   [javac]                    ^
   [javac]     constructor RuleAlternatives.RuleAlternatives(String[]) is not applicable
   [javac]       (actual and formal argument lists differ in length)
   [javac]     constructor RuleAlternatives.RuleAlternatives(RuleComponent[],int[]) is not applicable
   [javac]       (actual argument Rule[] cannot be converted to RuleComponent[] by method invocation conversion)
   [javac]     constructor RuleAlternatives.RuleAlternatives(RuleComponent[]) is not applicable
   [javac]       (actual and formal argument lists differ in length)
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:186: error: no suitable constructor found for RuleSequence(Rule[])
   [javac]             return new RuleSequence(subrules);
   [javac]                    ^
   [javac]     constructor RuleSequence.RuleSequence(String[]) is not applicable
   [javac]       (actual argument Rule[] cannot be converted to String[] by method invocation conversion)
   [javac]     constructor RuleSequence.RuleSequence(RuleComponent[]) is not applicable
   [javac]       (actual argument Rule[] cannot be converted to RuleComponent[] by method invocation conversion)
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:191: error: no suitable constructor found for RuleCount(Rule,int)
   [javac]             return new RuleCount(convert(ruleCount.getRule()), ruleCount
   [javac]                    ^
   [javac]     constructor RuleCount.RuleCount(RuleComponent,int,int,int) is not applicable
   [javac]       (actual and formal argument lists differ in length)
   [javac]     constructor RuleCount.RuleCount(RuleComponent,int,int) is not applicable
   [javac]       (actual and formal argument lists differ in length)
   [javac]     constructor RuleCount.RuleCount(RuleComponent,int) is not applicable
   [javac]       (actual argument Rule cannot be converted to RuleComponent by method invocation conversion)
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:197: error: constructor RuleTag in class RuleTag cannot be applied to given types;
   [javac]             return new RuleTag(convert(ruleTag.getRule()), ruleTag.getTag());
   [javac]                    ^
   [javac]   required: Object
   [javac]   found: Rule,String
   [javac]   reason: actual and formal argument lists differ in length
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:202: error: incompatible types
   [javac]             return new RuleToken(ruleToken.getText());
   [javac]                    ^
   [javac]   required: Rule
   [javac]   found:    RuleToken
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseRuleGrammar.java:424: error: cannot find symbol
   [javac]                 tokens[i] = rt[i].getSpokenText();
   [javac]                                  ^
   [javac]   symbol:   method getSpokenText()
   [javac]   location: interface ResultToken
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseResult.java:29: error: BaseResult is not abstract and does not override abstract method getNumTokens() in Result
   [javac] public class BaseResult
   [javac]        ^
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseResult.java:210: error: getAudio(ResultToken,ResultToken) in BaseResult cannot implement getAudio(ResultToken,ResultToken) in FinalResult
   [javac]     public AudioClip getAudio(ResultToken from, ResultToken to)
   [javac]                      ^
   [javac]   return type AudioClip is not compatible with AudioSegment
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseResult.java:203: error: getAudio() in BaseResult cannot implement getAudio() in FinalResult
   [javac]     public AudioClip getAudio() throws ResultStateError {
   [javac]                      ^
   [javac]   return type AudioClip is not compatible with AudioSegment
   [javac] C:\Users\vasu\workspace\Sphinx-4\src\jsapi\com\sun\speech\engine\recognition\BaseResult.java:77: error: cannot find symbol
   [javac]             copy.nTokens = result.numTokens();
   [javac]                                  ^
   [javac]   symbol:   method numTokens()
   [javac]   location: variable result of type Result
   [javac] 100 errors

建立失败

C:\Users\vasu\workspace\Sphinx-4\build.xml:223: The following error occurred while executing this line:
C:\Users\vasu\workspace\Sphinx-4\build.xml:244: Compile failed; see the compiler error output for details.

总时间:26秒

1 个答案:

答案 0 :(得分:0)

你不应该在eclipse中使用build.xml,它是用于使用ant构建的。您需要使用Eclipse来构建sphinx4:

  1. 将sphinx4项目导入Eclipse(导入.. - &gt;现有项目 进入工作区)
  2. 运行构建
  3. 它会很好。