Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/326.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 电话';硕士';在声学模型中是错误的;单词';马苏德';-口袋狮身人面像_Android_Python_Pocketsphinx_Pocketsphinx Android - Fatal编程技术网

Android 电话';硕士';在声学模型中是错误的;单词';马苏德';-口袋狮身人面像

Android 电话';硕士';在声学模型中是错误的;单词';马苏德';-口袋狮身人面像,android,python,pocketsphinx,pocketsphinx-android,Android,Python,Pocketsphinx,Pocketsphinx Android,我的名字是masoud。 现在我想当我说masoud时,我的应用程序会打印控制台日志 为此,我制作了一个mdic.txt文件,并将我的名字放在其中: 马苏德马索德酒店 我将mdic.txt更改为mdic.dict,并将其置于assets/syncdirecotry 我制作了一个cm.txt文件,并在其中放了一个字符串: #JSGF V1.0; /** * JSGF Grammar for Hello World example */ grammar masoud; public <gr

我的名字是
masoud
。 现在我想当我说
masoud
时,我的应用程序会打印控制台日志

为此,我制作了一个
mdic.txt
文件,并将我的名字放在其中:

马苏德马索德酒店

我将
mdic.txt
更改为
mdic.dict
,并将其置于
assets/sync
direcotry

我制作了一个
cm.txt
文件,并在其中放了一个字符串:

#JSGF V1.0;
/**
 * JSGF Grammar for Hello World example
 */
grammar masoud;
public <greet> = (good morning | masoud) ( bhiksha | evandro | paul | philip | rita | will );
现在我得到了这个信息:

“dict.c”,第195行:第1行:电话“MA”在声学中出错 模型单词“masoud”忽略了“kws_search.c”,第171行:单词 字典里没有“马苏德”


我在
recognizer.addKeywordSearch(KWS_搜索,新文件(assetsDir,“mdic.dict”))中发现了这个错误行。

masoud的正确转录是“M AH S UW D”


声学模型中没有手机MA。错误说明了这一点。

马苏德的正确抄本是“M AH S UW D”
private void setupRecognizer(File assetsDir) throws IOException {
    // The recognizer can be configured to perform multiple searches
    // of different kind and switch between them

    recognizer = SpeechRecognizerSetup.defaultSetup()
            .setAcousticModel(new File(assetsDir, "en-us-ptm"))
            //.setDictionary(new File(assetsDir, "cmudict-en-us.dict"))
            .setDictionary(new File(assetsDir, "mdic.dict"))
            //.setRawLogDir(assetsDir) // To disable logging of raw audio comment out this call (takes a lot of space on the device)
            .setKeywordThreshold(1e-45f) // Threshold to tune for keyphrase to balance between false alarms and misses
            .setBoolean("-allphone_ci", true)  // Use context-independent phonetic search, context-dependent is too slow for mobile


            .getRecognizer();
    recognizer.addListener(this);

    /** In your application you might not need to add all those searches.
     * They are added here for demonstration. You can leave just one.
     */

    // Create keyword-activation search.
    //recognizer.addKeyphraseSearch(KWS_SEARCH, KEYPHRASE);

    recognizer.addKeywordSearch(KWS_SEARCH, new File(assetsDir, "mdic.dict"));