File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858
5959
6060; ; Run dynamic psi
61- (psi-updater-run)
61+ ; (psi-updater-run)
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ u: (me name be _*) $name='_0 Hi '_0
1414
1515u: (what be me name $name) Your name is $name
1616
17- u: (you hate human ) no. you are very interesting. Do you hate robotos ?
17+ u: (you hate humans ) no. you are very interesting. Do you hate robots ?
1818 a: (yes) I am sure you are going to like me though
1919 a: (no) We will get along fine
2020
Original file line number Diff line number Diff line change 6161 )
6262 )
6363
64+ #|
6465 ; Finally send text output to stt when there is one
6566 ; Note: This code is only for demo (stt input should be read from port)
66-
67+
6768 (set! ghost-result (ghost-get-result))
6869 (for-each (lambda (a )
6970 (set! txt-str (string-trim (string-append txt-str " " (cog-name a))))
7980 )
8081
8182 )
83+ |#
8284
8385 )
86+ (usleep 10000 )
8487 )
8588
8689)
Original file line number Diff line number Diff line change 3232
3333; load scratch interface
3434(include " scratch/scratch.scm" )
35+
36+
37+ (define txt-str-prev "")
38+
39+ (while #t
40+ (let ((txt-str " " )
41+ (ghost-result '() ))
42+
43+
44+ ; Finally send text output to stt when there is one
45+ ; Note: This code is only for demo (stt input should be read from port)
46+
47+ (set! ghost-result (ghost-get-result))
48+ (for-each (lambda (a )
49+ (set! txt-str (string-trim (string-append txt-str " " (cog-name a))))
50+ )ghost-result
51+ )
52+
53+ (if (equal? txt-str txt-str-prev)
54+ (continue)
55+ (begin
56+ (act-say txt-str)
57+ (set! txt-str-prev txt-str)
58+ )
59+
60+ )
61+
62+ )
63+ (usleep 100000 )
64+
65+ )
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ const char *face_detect()
8686 std::to_string(faces[i].height) + ";";
8787 //ret += ";";
8888 //cv::imshow("image", frame);
89+ cv::imwrite("face.jpg", frame);
8990 return ret.c_str();
9091}
9192
@@ -111,8 +112,8 @@ const char *face_smile_detect()
111112 }
112113 //ret += ";";
113114 //cv::imshow("image", frame);
114- std::cout<<ret<<std::endl;
115- cv::imwrite("face_smile.jpg", frame);
115+ // std::cout<<ret<<std::endl;
116+ // cv::imwrite("face_smile.jpg", frame);
116117 return ret.c_str();
117118}
118119
Original file line number Diff line number Diff line change 120120 (close client))
121121 )
122122 )
123+ (usleep 100000 )
123124 )
124125 )
125126)
You can’t perform that action at this time.
0 commit comments