Saving To Target File Issue...
Saving To Target File Issue...
- Subject: Saving To Target File Issue...
- From: Domains4Days <email@hidden>
- Date: Sat, 15 Nov 2003 06:21:49 -0800
Hello. I seem to be having a problem with the text to audio command -
3saving to target file2. Although the regular 3say2 command seems to accept
commas ok { with a small pause}, when you use the command 3 saving to
target file2, then every time the text encounters a comma, the speed of
the text drops down to a very low speed, even though the rate was set
earlier.
I tried to replace each comma with a comma and a new rate command - but
this did not work. The only thing it did work for me was to replace the,
with a period - (Providing the small pause - but a bit too long)
The main line: (from below)
say "[[rate 300]]" & message_text using default_voice saving to target_file
Q: is there a way repair this issue - or is it simply a small bug?
Thanks for your help in advance - RevDave
--------example: CODE---------
set the message_text to the "this is a test, of the very cool text to audio
function."
property target_file : ""
set this_voice to ""
set default_voice to "Fred"
set the message_text to the clipboard
-- these don't work--
--set the message_text to replace_chars(message_text, ", ", ", [[rate 300]]
")
--set the message_text to replace_chars(message_text, ", ", " [[rate 300]],
")
--This does work but...
set the message_text to replace_chars(message_text, ",", ".")
on replace_chars(this_text, search_string, replacement_string)
set AppleScript's text item delimiters to the search_string
set the item_list to every text item of this_text
set AppleScript's text item delimiters to the replacement_string
set this_text to the item_list as string
set AppleScript's text item delimiters to ""
return this_text
end replace_chars
set the target_file to choose file name with prompt "Name and location for
the sound file:" default name "rendered.aiff"
say "[[rate 300]]" & message_text using default_voice saving to target_file
--
RevDave
email@hidden
[db-lists]
Check out some great Domain Names at:
http://www.domains4days.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.