[Openmcl-devel] Issues with CCL and "Hysterical" voice

Raffael Cavallaro raffaelcavallaro at mac.com
Wed Jan 16 15:42:34 PST 2008

After seeing Alex Repenning's post on the info-mcl list about speech  
and MCL, I thought I'd see how well this works with CCL. It's pretty  
straightforward and everything seems to work with one exception - the  
voice "Hysterical" not only doesn't work from CCL, but it causes  
CCL.app to use 50-60% cpu and only quitting seems to alleviate this  
excess processor usage.

(in-package :ccl)

(defparameter *available-voice-list*
   (let* ((voice-array (#/availableVoices ns:ns-speech-synthesizer))
          (count (#/count voice-array))
           (loop for index from 0 below count
             collect (lisp-string-from-nsstring (#/objectAtIndex:  
voice-array index))))
           (loop for voice-identifier in voice-identifier-list
             (subseq voice-identifier
                     (length "com.apple.speech.synthesis.voice.")  
(length voice-identifier)))))

(defun speak-string (a-string &key (voice "Alex"))
      (let* ((voice-identifier
              (concatenate 'string "com.apple.speech.synthesis.voice."  
              (#/initWithVoice: (#/alloc ns:ns-speech-synthesizer)  
        (#/startSpeakingString: the-synth a-string))))

then executing:

(loop for voice-name in *available-voice-list* do
     (when (not (string= voice-name "Hysterical"))
       (speak-string voice-name :voice voice-name)
       (sleep 2)))

will cause all the voices to say their names in sequence (with the  
explicit exception of "Hysterical").

However, this:

? (speak-string "hello" :voice "Hysterical")

returns T, no sound is produced, and CCL.app's cpu usage goes up to  
50-60% and stays there.

If it matters, other software can access the "Hysterical" voice  
without issue.

Any ideas what might be causing this issue?



Raffael Cavallaro, Ph.D.
raffaelcavallaro at mac.com

More information about the Openmcl-devel mailing list