ã¯ããã«
v8 を利用した C++ から JavaScript へクラスを簡単にエクスポートするヤツ作ってみた - 凹みTips ã«ã¦ä½ã£ã C++ ã¯ã©ã¹ã JavaScript ã«æã£ã¦ããã¤ããã¡ãã£ã¨æ¹è¯ãã¾ãã
create_context ã¨ãæ示çã«ãããªãã¦ãè¯ãããã«ãªã£ã¦ã¾ããHandleScope ãã¡ã³ãå¤æ°ã«ãªã£ã¦ãã¨ãè²ã
ã¤ã±ã¦ãªãã¨ããã¯ã¾ã 沢山ããã¾ããâ¦ã
ããã使ã£ã¦ JuliusãiRemoconãOpenJTalk ã JavaScript ããå¶å¾¡ã§ããããã«ãã¾ããã
ã§ããããã«ãªã£ããã¨
JavaScriptãããããªãã¨ãåºæ¥ãããã«ãªãã¾ããã
function test() { print("this is test."); } var mei = new OpenJTalk(); mei.init("data/mei_normal", "openjtalk/open_jtalk_dic_utf_8-1.05"); var ir = new iRemocon(); ir.connect('192.168.0.7', 51013); Julius.init("./data/setting.jconf"); Julius.onSpeechReady = function(){ print("onSpeechReady"); }; Julius.onSpeechStart = function(){ print("onSpeechStart"); }; Julius.onResult = function(result){ print("onResult"); if (/ãã¬ã.*?ã¤ã/.test(result)) { mei.talk("ãã¬ããã¤ãã¾ã¼ã"); ir.send(1); } }; Julius.start();
ããã§ããã¬ããã¤ãã¦ãã¨åãã¨ããã¬ããã¤ãã¾ã¼ããã¨ãã£ã¦ãã¬ããã¤ãã¾ãã
è²ã
ãªå¶å¾¡ã大å楽ã«åºæ¥ãããã«ãªãã¾ãããä¸è¨ä¾ã§ã¯ç°¡åãªãã¨ãããã¦ãã¾ããããXMLã®ãããªéçãªè¨å®ãã¡ã¤ã«ã¨ããå½¢ã ãã§ã¯è¡¨ç¾ã§ããªãã£ããã¨ãè²ã
åºæ¥ãããã«ãªãã¨æãã¾ããä»ã«ãæ©æ¢°å¦ç¿ï¼Juliusの認識結果をOLLでオンライン学習させてみたら結構良かった - 凹みTipsï¼ããæ¥æ¬èªããèªã¿ã¸ã®å¤æï¼ICU + Mecab で文章をローマ字の読みに変換 - 凹みTipsï¼è¾ºãããã¼ãã£ã³ã°ã㦠Julius ã®è¨å®ãã¡ã¤ã«ãç°¡åã«æ¸ããããã«ããã°â¦ã¨è²ã
ãã£ã¦ããã°é¢ç½ããé¨å±ãåºæ¥ããã§ãã
ã©ããã£ã¦ C++ ãã JavaScript ã¸ã¯ã©ã¹ããã¼ãã£ã³ã°ãã¦ãããã¯ã
ããããè¦ã¦ããã ããã°åããã¨æãã¾ãã
ä»å¾ã®å±æ
ä»åã®å 容ã¯ä½¿ããªããªããããããªãã§ããã次㯠node.js ã®ã¢ããªã³ã¨ãã¦ãããã£ã Julius ã OpenJTalk ãä½ã£ã¦è¡ãããã§ããããããã°åããã㦠Twitter ã®å 容ã天æ°ãåã£ã¦ããã£ãããã»ã³ãµç³»ãã¤ãªããã°æ¸©åº¦æãã¦ããããâ¦ããªé¨å±ãç°¡åã«ä½ããæ°ããã¾ããã¨ãããããªã¢ããªã³ã JavaScript ãå ±æããã¹ãã¼ã¹ä½ãã°ãä¸ã®ä¸å¹¸ãã«ãªããªãã§ãããã¼ãã¨ããã«ããã«ãèãããã