Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Speech from Perl

Speech from Perl
Thread Tools
Fresh-Faced Recruit
Join Date: Sep 2002
Status: Offline
Reply With Quote
Sep 24, 2002, 03:56 PM
 
Hi,

I need to be able to send strings to Apple's Speech syth engine from Perl. I want to be able to do something similar to doing this in applescript (say "hello world"). I know this was possible with MacPerl under 9 but I have not found any example code that might be able to give me a hint on how to do this in X.

Any ideas?

Thanks,
Jon
     
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Sep 24, 2002, 05:34 PM
 
#!/usr/bin/perl
system("osascript -e 'say \"hello joe!\"'");


Note that this works when executed on the command line or by a GUI app, but will not have security rights if you run it via SSH or in a CGI script.
     
jboehm  (op)
Fresh-Faced Recruit
Join Date: Sep 2002
Status: Offline
Reply With Quote
Sep 24, 2002, 05:39 PM
 
Originally posted by Mithras:
#!/usr/bin/perl
system("osascript -e 'say \"hello joe!\"'");

Yes I have done this already, but its on the slow side. I was hoping to access Speech directly.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Sep 27, 2002, 05:05 PM
 
There is no direct access to speech from Perl, but you could probably write a .pm that wraps the C API, or something.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:50 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2