Re: Say command using "Organ" doesn't work
Re: Say command using "Organ" doesn't work
- Subject: Re: Say command using "Organ" doesn't work
- From: kai <email@hidden>
- Date: Sun, 19 Mar 2006 00:52:52 +0000
On 18 Mar 2006, at 21:17, Adam Bell wrote:
While not as crisp as it could be, this script will let you listen
to the voices in Tiger:
tell application "Finder"
set F to alias (((path to library folder from system domain) as
string) & "Speech:Voices:")
set v to name of items of F
end tell
set vn to {}
set text item delimiters to ".SpeechVoice"
repeat with k from 1 to count of v
tell text item 1 of item k of v
if it is not in {"BadNews", "GoodNews" , "Organ"} then
set end of vn to it
else if it is "BadNews" then
set end of vn to "Bad News"
else if it is "GoodNews" then
set end of vn to "Good News"
else
set end of vn to "Pipe Organ"
end if
end tell
end repeat
choose from list vn without multiple selections allowed and empty
selection allowed
set tVoice to result
set text item delimiters to ""
try
say "This is a sample of " & tVoice using tVoice
on error theError
display dialog theError
end try
-- used to be simpler.
Here's an alternative approach, FWIW:
---------------
to test_voice()
set f to path to voices as Unicode text
set l to list folder f without invisibles
repeat with i in l
set t to read file (f & i & ":Contents:Resources:VoiceDescription")
set i's contents to t's text 18 thru (17 + (ASCII number t's
character 17))
end repeat
set v to choose from list l with prompt "Please choose a voice:"
if v is not false then say "This is a sample of " & v using v
end test_voice
test_voice()
---------------
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden