[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))
          (voice-identifier-list
           (loop for index from 0 below count
             collect (lisp-string-from-nsstring (#/objectAtIndex:  
voice-array index))))
          (voice-name-list
           (loop for voice-identifier in voice-identifier-list
             collect
             (subseq voice-identifier
                     (length "com.apple.speech.synthesis.voice.")  
(length voice-identifier)))))
     voice-name-list))

(defun speak-string (a-string &key (voice "Alex"))
     (with-autorelease-pool
      (let* ((voice-identifier
              (concatenate 'string "com.apple.speech.synthesis.voice."  
voice))
             (the-synth
              (#/initWithVoice: (#/alloc ns:ns-speech-synthesizer)  
voice-identifier)))
        (#/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")
T

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?

regards,

Ralph

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




More information about the Openmcl-devel mailing list