This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
project:dmcpp [2010/06/16 20:31] – created nishimotz | project:dmcpp [2010/11/09 08:58] (current) – nishimotz | ||
---|---|---|---|
Line 1: | Line 1: | ||
in Japanese: http:// | in Japanese: http:// | ||
+ | ====== DMCPP ====== | ||
+ | |||
+ | An experimental dialog manager for [[http:// | ||
+ | |||
+ | Source file: http:// | ||
+ | |||
+ | An experiment which replaces the dialog manager (DM) creaded by galatea-generate by an application written in C++. | ||
+ | |||
+ | The DM application also handles speech recognition engine [[: | ||
+ | [[:opencv]] face detection is also integrated. | ||
+ | |||
+ | The project is tested with Ubuntu 9.04, 10.04, 10.10 (i386). | ||
+ | In this project, the character encoding is UTF-8. | ||
+ | Japanese speech engines are used, currently. | ||
+ | |||
+ | ===== setup ===== | ||
+ | |||
+ | Ubuntu official packages: | ||
+ | |||
+ | < | ||
+ | $ sudo aptitude install ruby | ||
+ | $ sudu aptitude install rake | ||
+ | $ sudo aptitude install freeglut3 | ||
+ | $ sudo aptitude install openjdk-6-jre | ||
+ | $ sudo aptitude install chasen | ||
+ | $ sudo aptitude install rhino | ||
+ | $ sudo aptitude install libreadline5 | ||
+ | $ sudo aptitude install ttf-sazanami-gothic | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | $ sudo aptitude install libasound2-dev | ||
+ | $ sudo aptitude install libavcodec52 | ||
+ | $ sudo aptitude install libavformat52 | ||
+ | </ | ||
+ | |||
+ | |||
+ | sourceforge.jp packages: | ||
+ | |||
+ | * http:// | ||
+ | * galatea-dialog-20100530 | ||
+ | * galatea-engine-20090604 | ||
+ | * galatea-ja-chaone-1.3.2 | ||
+ | * galatea-ja-unidic-1.3.9 | ||
+ | |||
+ | packages by nishimotz: | ||
+ | |||
+ | <del> | ||
+ | * http:// | ||
+ | * or http:// | ||
+ | * [[:rake]] is required for [[: | ||
+ | </ | ||
+ | |||
+ | * http:// | ||
+ | * http:// | ||
+ | * opencv 1.x is not tested. | ||
+ | |||
+ | An USB camera, working with Linux, is also required. | ||
+ | |||
+ | ===== compilation and execution ===== | ||
+ | |||
+ | Clone source files using git | ||
+ | |||
+ | < | ||
+ | $ git clone git:// | ||
+ | $ cd dmcpp | ||
+ | </ | ||
+ | |||
+ | or download dmcpp tar ball. | ||
+ | Visit [[http:// | ||
+ | |||
+ | nishimotz-dmcpp-ec191ea.tar.gz (the revision may be different.) | ||
+ | |||
+ | < | ||
+ | $ tar xvfz nishimotz-dmcpp-ec191ea.tar.gz | ||
+ | $ cd nishimotz-dmcpp-ec191ea | ||
+ | </ | ||
+ | |||
+ | compile and run: | ||
+ | |||
+ | < | ||
+ | $ make | ||
+ | $ ./ | ||
+ | </ | ||
+ | |||
+ | If you get error while doing make, something is wrong. | ||
+ | |||
+ | Speak " | ||
+ | |||
+ | ===== speech recognition grammar ===== | ||
+ | |||
+ | gram.txt contains the lines of Japanese words, | ||
+ | such as " | ||
+ | which consists of the pronunciation and desctiption. | ||
+ | |||
+ | Within the make, gram is generated. | ||
+ | The procedure is written in rakefile.rb. | ||
+ | A class within the Java verion of Dialog Studio is invoked. | ||
+ | |||
+ | ===== dm.cpp ===== | ||
+ | |||
+ | http:// | ||
+ | |||
+ | In main() thread, stdin is read and processed. | ||
+ | |||
+ | julius_worker(), | ||
+ | |||
+ | struct thread_info_t can be used for sharing information among the thread. | ||
+ | It can be used for dialog management. | ||
+ | |||
+ | ==== speech recognition and synthesis ==== | ||
+ | |||
+ | The task is " | ||
+ | |||
+ | In the callback function output_result(), | ||
+ | |||
+ | INTERIM [[: | ||
+ | |||
+ | julius_worker() is created and detached using pthread. | ||
+ | |||
+ | The use of workorder_t is a future work. | ||
+ | |||
+ | ==== face detectiuon ==== | ||
+ | |||
+ | [[:opencv]] based face detection is also integrated experimentally. | ||
+ | |||
+ | The worker thread, cv_worker(), | ||
+ | |||
+ | ===== app ===== | ||
+ | |||
+ | It replaces [[: | ||
+ | |||
+ | app/ | ||
+ | |||
+ | < | ||
+ | # module: | ||
+ | module: | ||
+ | </ | ||
+ | |||
+ | Although the extention of file is txt, this is ERB. | ||
+ | |||
+ | $runner_dir is a global value defined at app/ |