2017-04-17 45 views
0

我正在嘗試使用CMUSphinx和Java實現德國命令和控制應用程序。到目前爲止,應用程序應該只識別幾個字(從1到9的數字,是/否)。CMUSphinx德國命令和控制應用程序,精度不高

不幸的是,準確性非常差。看來,如果一個單詞被正確識別,這只是偶然。

這裏是我的Java代碼到目前爲止(改編自教程):

public static void main(String[] args) throws IOException { 

    // Configuration Object 
    Configuration configuration = new Configuration(); 

    // Set path to the acoustic model. 
    configuration.setAcousticModelPath("resource:/cmusphinx-de-voxforge-5.2"); 

    // Set path to the dictionary. 
    configuration.setDictionaryPath("resource:/cmusphinx-voxforge-de.dic"); 

    // use grammar 
    configuration.setGrammarPath("resource:/"); 
    configuration.setGrammarName("dialog"); 
    configuration.setUseGrammar(true); 

    LiveSpeechRecognizer recognizer = new LiveSpeechRecognizer(configuration); 

    recognizer.startRecognition(true); 
    SpeechResult result; 
    while ((result = recognizer.getResult()) != null) { 
     System.out.format("Hypothesis: %s\n", result.getHypothesis()); 
    } 
    recognizer.stopRecognition(); 
} 

這裏是我的語法文件:

#JSGF V1.0; 

grammar dialog; 

public <digit> = 1 | 2 | 3 | 4 |5 | 6 | 7 | 8 | 9 | ja | nein; 

我已經下載了德國聲學模型和字典從這裏:https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/German/

有什麼明顯的我在這裏失蹤?哪裏有問題?

在此先感謝和親切的問候。

+0

您需要提供音頻數據和您更改的模型以重現您的問題。像1,2這樣的數字默認不是字典的一部分,你不能在語法中使用它們。 –

+0

感謝您的重播。 1)你的音頻數據是什麼意思?我想要認識的音頻?或者爲了一個新的聲學模型? 2)我改變了1以及其中一個(這是詞典的一部分)。似乎沒有提高準確性:( –

+0

我又添加了'cmusphinx-voxforge-de.lm.bin'。沒有效果。 –

回答

0

好吧,準確度不是很高,可能原來的數據庫沒有像你這樣的很多例子。部分你的方言也有貢獻,德國人用z表示7,而不是用s表示。在你的房間裏部分回聲也有貢獻。我不確定您是如何錄製音頻的,如果您在兩者之間使用了一些壓縮或編解碼器,則可能會導致準確度不佳。

您可能需要收集幾百個樣本並執行MAP自適應以提高準確性。