• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
text to aiff audio script step (DealTek)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

text to aiff audio script step (DealTek)


  • Subject: text to aiff audio script step (DealTek)
  • From: Jim Weisbin <email@hidden>
  • Date: Thu, 8 Jul 2010 15:54:17 -0400

On Thu, 8 Jul 2010 11:09:27 -0700 DealTek <email@hidden> wrote:

"I am able to use applescript step say "test"

to speak the text . I seem to remember there were additional commands to be able to have the text saved to AIFF audio files also ...."

This was fun...

on run
tell application "Finder"
display dialog ¬
"Type in some text" default answer "OK"
set dialogInfo to result
set theText to text returned of dialogInfo
set displayString to "Input rate (160-210)"
set defaultAnswer to "160"
repeat
set response to display dialog displayString default answer defaultAnswer
try
set theRate to (text returned of response) as number
if theRate < 160 or theRate > 210 then
error "Please enter a rate between 160 and 210"
end if
exit repeat
on error errstr
beep
set displayString to errstr & return & displayString
set defaultAnswer to text returned of response
end try
end repeat
set theVoice to choose from list {"Agnes - female voice", ¬
"Albert - male voice", ¬
"Bad News - singing funereal voice", ¬
"Bahh - an old male voice", ¬
"Bells - singing, ringing bell effect voice", ¬
"Boing - a springy effect voice", ¬
"Bruce - male voice", ¬
"Bubbles - bubble effect voice", ¬
"Cellos - singing voice", ¬
"Deranged - a nervous voice", ¬
"Fred - male voice", ¬
"Hysterical - laughing voice", ¬
"Junior - young boy's voice", ¬
"Kathy - female voice", ¬
"Pipe Organ - singing organ effects voice", ¬
"Princess - young girl's voice", ¬
"Ralph - deep male voice", ¬
"Trinoids - alien voice", ¬
"Victoria - female voice", ¬
"Whisper - whispering voice", ¬
"Zarvox - alien voice"} with prompt "Choose a voice"
set theVoice to word 1 of (theVoice as text)
set theText to " [[rate " & theRate & "]] " & theText
set theFileName to (path to desktop as text) & "myFile.aif"
say theText using theVoice saving to theFileName
tell application id "com.apple.quicktimeplayer"
activate
open theFileName
play document 1
end tell
end tell
end run

Jim Weisbin | C.T.O. | human | 138 Fifth Avenue | 3rd Floor | New York, NY | 10011 |  (212) 352-0211 |  (917) 375-2272 | Los Angeles Office | 2046 Broadway | Santa Monica, CA | 90404 |  (310) 264-0211 telephone | www.humanworldwide.com

 Follow this link to view human’s reel online: http://www.humanworldwide.com/flash2007/?reelid=13


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: text to aiff audio script step
      • From: "Stockly, Ed" <email@hidden>
    • Re: text to aiff audio script step (DealTek)
      • From: "email@hidden" <email@hidden>
  • Prev by Date: Re: checking GUI action status
  • Next by Date: Re: text to aiff audio script step (DealTek)
  • Previous by thread: Re: text to aiff audio script step
  • Next by thread: Re: text to aiff audio script step (DealTek)
  • Index(es):
    • Date
    • Thread