Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Java API to Mac text read-aloud capability?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java API to Mac text read-aloud capability?



freetts does run on the mac
but NS class works much better

that's why I implemented our speaker via tts for windows and linux but via cocoa class for mac os x


On Jun 21, 2005, at 4:47 PM, Michael Louka wrote:

FreeTTS runs on the Mac.

http://freetts.sourceforge.net/docs/index.php

It provides a subset of the Java Speech API v1.0.

Worth checking out for a cross-platform solution.

Michael.

On Jun 21, 2005, at 21:50, Doug Zwick wrote:


Bill Janssen wrote:



MacOS X seems to be able to read text aloud at the drop of a hat. Is
there a Java interface to that capability? I'm thinking of something
like


  package com.apple...

  class Speech {

  ...

     static public void say (String text_to_speak,
                             Voice voice_to_use,
                             float volume);
  ...
  }

Preferably something thread-safe so that multiple threads could say
multiple things simultaneously.



There is a javax.speech.synthesis package:

http://java.sun.com/products/java-media/speech/forDevelopers/jsapi- guide/Synthesis.html

However, I know of no implementations of it for the Mac.
(I could well be wrong, I didn't look very hard).

For a real quick-and-dirty hack to do this, try the "say"
command via Runtime.exec:

    String [] sayIt = { "say", "Goodbye, cruel world" };
    Process p = Runtime.getRuntime().exec (sayIt);

Don't forget to drain the output streams from the Process
object to prevent deadlocks. There are other options for
"say", see the man page for details.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40halden.net


This email sent to email@hidden




_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


Dmitry Markman

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Java API to Mac text read-aloud capability? (From: Doug Zwick <email@hidden>)
 >Re: Java API to Mac text read-aloud capability? (From: Michael Louka <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.