Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
project:dmcpp [2010/06/16 20:37] nishimotzproject:dmcpp [2010/11/09 08:58] (current) nishimotz
Line 1: Line 1:
 in Japanese: http://ja.nishimotz.com/project:dmcpp in Japanese: http://ja.nishimotz.com/project:dmcpp
- 
 ====== DMCPP ====== ====== DMCPP ======
  
-dialog manager for [[:galatea]], using lib[[:julius]] and [[:opencv]], written in C++.+An experimental dialog manager for [[http://sourceforge.jp/projects/galatea/|galatea]], using lib[[http://sourceforge.jp/projects/julius/|julius]] and [[http://sourceforge.net/projects/opencvlibrary/|opencv]], written in C++.
  
 Source file: http://github.com/nishimotz/dmcpp Source file: http://github.com/nishimotz/dmcpp
Line 9: Line 8:
 An experiment which replaces the dialog manager (DM) creaded by galatea-generate by an application written in C++. 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 [[:julius]], with the same mannar of the Java based [[:dialogstudio]].+The DM application also handles speech recognition engine [[:julius]], with the same mannar of the Java based [[:galatea_dialog_studio]].
 [[:opencv]] face detection is also integrated. [[:opencv]] face detection is also integrated.
  
-The project is tested with Ubuntu 9.04 and Ubuntu 10.04 (i386).+The project is tested with Ubuntu 9.0410.04, 10.10 (i386).
 In this project, the character encoding is UTF-8. In this project, the character encoding is UTF-8.
 Japanese speech engines are used, currently. Japanese speech engines are used, currently.
Line 22: Line 21:
 <code> <code>
 $ sudo aptitude install ruby $ sudo aptitude install ruby
 +$ sudu aptitude install rake
 $ sudo aptitude install freeglut3 $ sudo aptitude install freeglut3
 $ sudo aptitude install openjdk-6-jre $ sudo aptitude install openjdk-6-jre
Line 29: Line 29:
 $ sudo aptitude install ttf-sazanami-gothic $ sudo aptitude install ttf-sazanami-gothic
 </code> </code>
 +
 +<code>
 +$ sudo aptitude install libasound2-dev
 +$ sudo aptitude install libavcodec52
 +$ sudo aptitude install libavformat52
 +</code>
 +
  
 sourceforge.jp packages: sourceforge.jp packages:
Line 40: Line 47:
 packages by nishimotz: packages by nishimotz:
  
 +<del>
   * http://files.nishimotz.com/ruby-1.9.2_preview3-2_i386.deb   * http://files.nishimotz.com/ruby-1.9.2_preview3-2_i386.deb
     * or http://files.nishimotz.com/ruby-1.9.1_p376-1_i386.deb     * or http://files.nishimotz.com/ruby-1.9.1_p376-1_i386.deb
-    *  [[:rake]] を使いたいだけで [[:ruby1.9]] をいれた。 aptitude install rake でもよかったかも +    *  [[:rake]] is required for [[:ruby1.9]]. "aptitude install rake" is maybe enough for this. 
-  * {{:julius_4.1.5-2_i386.deb|}} +</del> 
-    * [[:julius]] を見てください+ 
 +  * http://ja.nishimotz.com/_media/julius_4.1.5-2_i386.deb
   * http://files.nishimotz.com/opencv-local_2.1.0-1_i386.deb   * http://files.nishimotz.com/opencv-local_2.1.0-1_i386.deb
-    * opencv 1.x 系は試していない+    * opencv 1.x is not tested. 
 + 
 +An USB camera, working with Linux, is also required. 
  
-Linux で認識できる USB カメラをつないでおく必要がある。 +===== compilation and execution =====
-===== コンパイルと実行 =====+
  
-git からレポジトリを複製する。+Clone source files using git
  
 <code> <code>
Line 58: Line 68:
 </code> </code>
  
-または dmcpp のソースをダウンロードする。 +or download dmcpp tar ball. 
-[[http://github.com/nishimotz/dmcpp|github]] で右上の download source をクリックして tar を選ぶ。+Visit [[http://github.com/nishimotz/dmcpp|github]] and click "download source" and select tar.
  
-nishimotz-dmcpp-ec191ea.tar.gz みたいな感じのファイルになる。(末尾の数字はバージョンによって異なる)+nishimotz-dmcpp-ec191ea.tar.gz (the revision may be different.)
  
 <code> <code>
Line 68: Line 78:
 </code> </code>
  
-コンパイルして実行。+compile and run:
  
 <code> <code>
Line 75: Line 85:
 </code> </code>
  
-make でエラーが出たらどこか失敗している。+If you get error while doing make, something is wrong.
  
-マイクに「安田講堂」と喋ると「安田講堂ですね」という応答が得られるはず。+Speak "Yasuda Kodo" to microphone, then the agent will speak "Yasuda Kodo desu ne."
  
-===== 音声認識文法 =====+===== speech recognition grammar =====
  
-gram.txt には「やすだこうどう 安田講堂」のように「読み」「表記」をスペース区切りで列挙。+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.
  
-make の中で gram の生成が行われるが、この処理は rakefile.rb に書かれており、 
-Java 版 Dialog Studio のクラスが呼び出されている。 
 ===== dm.cpp ===== ===== dm.cpp =====
  
 http://github.com/nishimotz/dmcpp/blob/master/dm.cpp http://github.com/nishimotz/dmcpp/blob/master/dm.cpp
  
-main() のスレッドで stdin を読んで処理する。+In main() thread, stdin is read and processed.
  
-julius_worker と cv_worker と main の3つの関数が +julius_worker(), cv_worker() and main() run simultaneously as the multiple threads.
-マルチスレッドで同時に動く。+
  
-構造体 thread_info_t を使ってスレッド間で変数を共有できるので、 +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 "parrot."
-output_result() コールバックの中で標準出力に "to @AM-MCL set Speak = %sですねという文字列を送っている。+
  
-INTERIM [[:julius_progout]] は stderr に出力だけして、現在は使っていない。+In the callback function output_result(), command such as "to @AM-MCL set Speak = %sですね" is send to the AgentManager via stdout.
  
-julius_worker() は pthread で create & detach されている。+INTERIM [[:julius_progout]] is just send to stderr, currently.
  
-workorder_t, thread_info_t などはスレッド間の情報のやりとりに使う予定。 +julius_worker() is created and detached using pthread.
-==== 顔検出 ====+
  
-[[:opencv]] の顔検出を組み合わせてみた。+The use of workorder_t is a future work.
  
-新たなworkerスレッド cv_worker() 関数にて顔検出のループを回している。+==== face detectiuon ==== 
 + 
 +[[:opencv]] based face detection is also integrated experimentally. 
 + 
 +The worker thread, cv_worker(), is running face detecion loop.
  
-対話制御に反映させるのはこれから。 
 ===== app ===== ===== app =====
  
-どうやって [[:dialogstudio]] の対話マネージャを入れ替えているか。+It replaces [[:galatea_dialog_studio]] dialog manager in the following way:
  
 app/skel/am.conf.txt app/skel/am.conf.txt
Line 126: Line 139:
 </code> </code>
  
-拡張子が txt になっているが ERB である。 +Although the extention of file is txt, this is ERB.
- +
-$runner_dir は app/script/runner で代入されるグローバル変数。+
  
 +$runner_dir is a global value defined at app/script/runner.
project/dmcpp.1276688266.txt.gz · Last modified: 2010/06/16 11:37 (external edit)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0