[Julius-cvs 476] CVS update: julius4/msvc/SampleApp

Zurück zum Archiv-Index

sumom****@users***** sumom****@users*****
2009年 10月 22日 (木) 23:04:11 JST


Index: julius4/msvc/SampleApp/SampleApp.cpp
diff -u julius4/msvc/SampleApp/SampleApp.cpp:1.1 julius4/msvc/SampleApp/SampleApp.cpp:1.2
--- julius4/msvc/SampleApp/SampleApp.cpp:1.1	Thu Oct 22 01:47:20 2009
+++ julius4/msvc/SampleApp/SampleApp.cpp	Thu Oct 22 23:04:11 2009
@@ -5,6 +5,9 @@
 #include "SampleApp.h"
 #include "Julius.h"
 
+// The jconf file name to load
+#define JCONFFILE "default.jconf"
+
 // Use a Julius class
 cJulius julius;
 
@@ -129,10 +132,12 @@
 	switch (message)
 	{
 	case WM_CREATE:
-		if (! julius.initialize("fast.jconf") ) {
-			MessageBox(hWnd, L"failed to initialize", L"Error", MB_OK);
+		// initialize Julius engine to prepare for recognition
+		if (! julius.initialize( JCONFFILE ) ) {
+			MessageBox(hWnd, L"Error while loading Julius engine.\n\"default.jconf\" is missing or some configurations are wrong\n", L"Error", MB_OK);
 			break;
 		}
+		// start recognition
 		if (! julius.startProcess(hWnd)) {
 			MessageBox(hWnd, L"failed to start process", L"Error", MB_OK);
 		}
@@ -228,4 +233,4 @@
 	TextOut(hdc , 10 , 10 + line * 20, str, lstrlen(str));
 	ReleaseDC(hWnd , hdc);
 	if (++line > 22) line = 0;
-}
\ No newline at end of file
+}



Julius-cvs メーリングリストの案内
Zurück zum Archiv-Index