]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODASRTTS-13 part 1
authorBrian West <brian@freeswitch.org>
Fri, 6 Mar 2009 17:44:27 +0000 (17:44 +0000)
committerBrian West <brian@freeswitch.org>
Fri, 6 Mar 2009 17:44:27 +0000 (17:44 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12483 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/asr_tts/mod_pocketsphinx/mod_pocketsphinx.c

index f5e015a7c1b7b6a310db724de765a33022d732ed..6f1718015bf9f4c1062502963c8aba4c5b0277ac 100644 (file)
@@ -134,15 +134,20 @@ static switch_status_t pocketsphinx_asr_load_grammar(switch_asr_handle_t *ah, co
                model = switch_mprintf("%s%smodel%s%s", SWITCH_GLOBAL_dirs.grammar_dir, SWITCH_PATH_SEPARATOR, SWITCH_PATH_SEPARATOR, globals.model16k);
        }
 
-       dic = switch_mprintf("%s%sdefault.dic", SWITCH_GLOBAL_dirs.grammar_dir, SWITCH_PATH_SEPARATOR, grammar);
+       dic = switch_mprintf("%s%sdefault.dic", SWITCH_GLOBAL_dirs.grammar_dir, SWITCH_PATH_SEPARATOR);
 
        if (switch_file_exists(dic, ah->memory_pool) != SWITCH_STATUS_SUCCESS) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open dictionary %s.\n", dic); 
                goto end;
        }
 
+       if (switch_file_exists(model, ah->memory_pool) != SWITCH_STATUS_SUCCESS) {
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't open speech model %s.\n", model); 
+               goto end;
+       }
+
        if (switch_file_exists(jsgf, ah->memory_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't open language model %s.\n", model); 
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't open grammar file %s.\n", jsgf); 
                goto end;
        }