Re: Speech impediment (Greg Spence)
Re: Speech impediment (Greg Spence)
- Subject: Re: Speech impediment (Greg Spence)
- From: Michelle Steiner <email@hidden>
- Date: Fri, 3 Aug 2001 08:03:47 -0700
On 8/3/01 7:35 AM, Greg Spence <email@hidden> wrote:
>
--Just for fun, here's a way to randomize the available voices.
>
>
repeat
>
set vList to list folder (path to voices)
>
set spk to display dialog "What Would You Like Me To Say?" default
>
answer "" buttons {"Quit", "OK"} default button 2
>
if button returned of result is "Quit" then exit repeat
>
set txt to text returned of spk
>
set cownt to number of items in vList
>
set rndm to random number from 1 to cownt
>
set aVoice to item rndm of vList
>
say txt using aVoice
>
end repeat
Just to be picky, here are a few suggestions.
1. Change "quit" to "cancel"; then you won't have to exit the repeat
loop; it will quit the script.
2. Instead of this:
>
set cownt to number of items in vList
>
set rndm to random number from 1 to cownt
>
set aVoice to item rndm of vList
>
say txt using aVoice
Try this:
say txt using some item of vList
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------