Hey keli,
Thanks. But, maybe I wasn’t totally clear in the problem I was having. I have all the voices already, I was trying to have my script loop through each one.
However I figured it out on my own (below). Now I wish the script could be cleaned up more as it seems a little long and I am sure that there is a way to shorten it down.
Anyway, thanks for your concern.
Here is the script:
set anSwer to the text returned of (display dialog "What text do you want to record?" default answer "") as text
tell application "System Events"
display dialog "First each of the men's voice. You can save more than one voice if you want."
try
say "Using Fred's voice..., " & anSwer using "Fred"
display dialog "Do you want to save this as an Audio File?" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
set fileName to "Fred.aiff"
set video_path to ((path to desktop as text) & fileName)
say anSwer using "Fred" saving to video_path
else
display dialog "Not good? Ok, moving onto the next voice."
end if
on error
display dialog "Didn't Work"
end try
try
say "Using Bruce's voice..., " & anSwer using "Bruce"
display dialog "Do you want to save this as an Audio File?" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
set fileName to "Bruce.aiff"
set video_path to ((path to desktop as text) & fileName)
say anSwer using "Bruce" saving to video_path
else
display dialog "Not good? Ok, moving onto the next voice."
end if
on error
display dialog "Didn't Work"
end try
try
say "Using Alex's voice..., " & anSwer using "Alex"
display dialog "Do you want to save this as an Audio File?" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
set fileName to "Alex.aiff"
set video_path to ((path to desktop as text) & fileName)
say anSwer using "Alex" saving to video_path
else
display dialog "Not good? Ok, moving onto the next voice."
end if
on error
display dialog "Didn't Work"
end try
try
say "Using Albert's voice..., " & anSwer using "Albert"
display dialog "Do you want to save this as an Audio File?" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
set fileName to "Albert.aiff"
set video_path to ((path to desktop as text) & fileName)
say anSwer using "Albert" saving to video_path
else
display dialog "Not good? Ok, moving onto the next voice."
end if
on error
display dialog "Didn't Work"
end try
try
say "Using Ralph's voice..., " & anSwer using "Ralph"
display dialog "Do you want to save this as an Audio File?" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
set fileName to "Ralph.aiff"
set video_path to ((path to desktop as text) & fileName)
say anSwer using "Ralph" saving to video_path
else
display dialog "Not good? Ok, moving onto the next voice."
end if
on error
display dialog "Didn't Work"
end try
try
say "Using Junior's voice..., " & anSwer using "Junior"
display dialog "Do you want to save this as an Audio File?" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
set fileName to "Junior.aiff"
set video_path to ((path to desktop as text) & fileName)
say anSwer using "Junior" saving to video_path
else
display dialog "Not good? Ok, moving onto the next voice."
end if
on error
display dialog "Didn't Work"
end try
display dialog "Now each of the women's voices. You can save more than one voice if you want."
try
say "Using Vicky's voice..., " & anSwer using "Vicky"
display dialog "Do you want to save this as an Audio File?" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
set fileName to "Vicky.aiff"
set video_path to ((path to desktop as text) & fileName)
say anSwer using "Vicky" saving to video_path
else
display dialog "Not good? Ok, moving onto the next voice."
end if
on error
display dialog "Didn't Work"
end try
try
say "Using Agnes voice..., " & anSwer using "Agnes"
display dialog "Do you want to save this as an Audio File?" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
set fileName to "Agnes.aiff"
set video_path to ((path to desktop as text) & fileName)
say anSwer using "Agnes" saving to video_path
else
display dialog "Not good? Ok, moving onto the next voice."
end if
on error
display dialog "Didn't Work"
end try
try
say "Using Kathy's voice..., " & anSwer using "Kathy"
display dialog "Do you want to save this as an Audio File?" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
set fileName to "Kathy.aiff"
set video_path to ((path to desktop as text) & fileName)
say anSwer using "Kathy" saving to video_path
else
display dialog "Not good? Ok, moving onto the next voice."
end if
on error
display dialog "Didn't Work"
end try
try
say "Using Princess voice..., " & anSwer using "Princess"
display dialog "Do you want to save this as an Audio File?" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
set fileName to "Princess.aiff"
set video_path to ((path to desktop as text) & fileName)
say anSwer using "Princess" saving to video_path
else
display dialog "Not good? Ok, moving onto the next voice."
end if
on error
display dialog "Didn't Work"
end try
try
say "Using Victoria's voice..., " & anSwer using "Victoria"
display dialog "Do you want to save this as an Audio File?" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
set fileName to "Victoria.aiff"
set video_path to ((path to desktop as text) & fileName)
say anSwer using "Victoria" saving to video_path
else
display dialog "Not good? Ok, moving onto the next voice."
end if
on error
display dialog "Didn't Work"
end try
display dialog "You are done! That's all the voices on MAC"
end tell