Liste des Groupes | Revenir à cu programmer |
Janis Papanagnou <janis_papanagnou@hotmail.com> writes:On 16.11.24 12:26, Muttley@dastardlyhq.com wrote:itThere is a command line util (MacOS "say")* that I wish to use
fork-exec'd from
my own program and send data to it via a socket created by socketpair().
Unfortunately "say" behaves differently depending on whether its stdin is
attached to a tty or not (and there's no cmd line option to prevent this).
With the former it'll speak after every newline, with the latter not until>gets an EOF and I'd rather not do a fork-exec for each individual word or>
phrase that needs to be spoken.
On shell level I'm using a program called 'pty' that takes the command
as argument to make it think it has a terminal connection.
‘script’ will do the same and already exists on macOS. It likes to write
stdout/stderr to a file as well as its own otuput, but you can use
/dev/null for that.
>
I had some trouble getting it to play fully nicely with say, but some
fiddling might get the desired effect.
Les messages affichés proviennent d'usenet.