2016-06-12 2 views
1
나는 다음과 같은 문법을 사용하고

: 나는 무게를 추가하지 않으면스핑크스 : java.lang.NullPointerException이 예외

#JSGF V1.0; 
grammar tag; 
public <tag> = <tagPart> +; 
<tagPart> = <digit> | <letter>; 

<digit> = oh | zero | one | two | three | four | five | six |seven | eight | nine ; 
<letter> = a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z ; 

모든 것이 잘 작동합니다. 무게 실행 :

Exception in thread "main" java.lang.NullPointerException 
    at edu.cmu.sphinx.jsgf.JSGFGrammar.getNormalizedWeights(JSGFGrammar.java:49) 

나는 문법을 사용하고있는 방법은 다음과 같습니다 :

<tagPart> = /0.8/ <digit> | /0.1/ <letter>; 

나는 다음과 같은 오류가 무엇입니까 내가 지연에 대한 미안 해요

Configuration configuration = new Configuration(); 
configuration.setAcousticModelPath("file:/E/sphinx4-5prealpha-src/sphinx4-data/src/main/resources/edu/cmu/sphinx/models/en-us/en-us"); 
configuration.setDictionaryPath("file:/E/sphinx4-5prealpha-src/sphinx4-data/src/main/resources/edu/cmu/sphinx/models/en-us/cmudict-en-us.dict"); 
configuration.setGrammarPath("file:/E/sT/src/main/resources/"); 
configuration.setGrammarName("tag"); 
configuration.setUseGrammar(true); 
StreamSpeechRecognizer recognizer = new StreamSpeechRecognizer(configuration); 

답변

1

를이 문제가있다 방금 수정 13217에 트렁크에 수정되었습니다, 다시 업데이 트하고 다시 시도하십시오, 그것은 작동합니다.

관련 문제