[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vocable help



Hi all,

I finally found how to make the help ballons spkoken. I don't know if it's
*really* usefull but anyway you can have a lot of fun with it. And it is
simple.

Just install PlainTalk (with GalaTea), load the speech.file (for the traps)
and the Speech-utils .lisp file (found on Cambridge). Then evaluate the
code bellow.

By default, I've made the thing quiet, just set *vocable-help-enabled-p* to
t. Helium could be very nice for using that feature. Thank Steve for the
pointers.

Enjoy!

----------------------------
(in-package :ccl)

;; no vocable help by default
(defvar *vocable-help-enabled-p* nil)
(defvar $$help-text nil)
(defvar $$speech-index 13)


(defmethod help-string :around ((self t))
  (let ((string (call-next-method)))
    (when *vocable-help-enabled-p* 
      (setf $$help-text string))
     string
  ))


(defmethod window-null-event-handler :around ((object t))
  (call-next-method)
  (when (and *vocable-help-enabled-p* $$help-text)
    (speak-in-voice $$speech-index $$help-text)
    (setf $$help-text nil))
  )

#|
(setf *vocable-help-enabled-p* t)
(setf *vocable-help-enabled-p* nil)

(setf $$speech-index 1)
|#

----------------------------


---
Lafourcade Mathieu
GETA (Groupe d'Etude pour la Traduction Automatique)
IMAG (Institut de Mathematiques Appliquees de Grenoble)
BP 53 38041 GRENOBLE CEDEX 9, FRANCE
Tel : (33) 76 51 43 80          Fax : (33) 76 51 44 05

mathieu.lafourcade@imag.fr