Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speech synthesis blocks interpreter #1570

Closed
ceremona opened this issue Jun 28, 2015 · 11 comments
Closed

Speech synthesis blocks interpreter #1570

ceremona opened this issue Jun 28, 2015 · 11 comments
Labels
comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" enhancement known issue
Milestone

Comments

@ceremona
Copy link

OSX 10.8.5

Was playing around with some sc tweets:

t=("it's gonna rain "!999).join;Speech.init(2);[98,99].do{|r,i|Speech.setSpeechVoice(i,3).setSpeechRate(i,r).channels[i].speak(t)};// #sc sr

I cannot kill/stop/reboot my server when running this. Runs forever. cmd"." doesn't stop it.

Seems like a bug....

@ceremona
Copy link
Author

Gui Server.reboot gives RESULTS = 0
Gui Server.Kill All Servers gives RESULTS = 1

@joshpar
Copy link
Member

joshpar commented Jun 28, 2015

I’m pretty sure Speech is run with the OS speech synthesis, NOT sc or its server. It is piped out as a shell command.


/* Joshua D. Parmenter
http://www.realizedsound.net/josh/ http://www.realizedsound.net/josh/

“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono
*/

On Jun 27, 2015, at 5:59 PM, ceremona notifications@github.com wrote:

Gui Server.reboot gives RESULTS = 0
Gui Server.Kill All Servers gives RESULTS = 1


Reply to this email directly or view it on GitHub #1570 (comment).

@scztt
Copy link
Contributor

scztt commented Jun 28, 2015

@joshpar is right, it's just running a command. It's blocking too (the .speech call), meaning sclang doesn't come up for air until it's made it's finished with both commands entirely.

@scztt scztt added this to the future milestone Jun 28, 2015
@ceremona
Copy link
Author

Ya, realized that was a OSX native call after I posted. Still. It would seem like Quitting the server shouldn't be contingent on some shelled/piped process that's gone rouge.

@scztt
Copy link
Contributor

scztt commented Jun 28, 2015

Unfortunately, the server is owned by the language, and in the case of your tweet, the language is hung until all the speech finishes.

@jamshark70
Copy link
Contributor

Hm, "enhancement" but what would the fix be? To make the speech call asynchronous (so that it doesn't block the language)?

It would seem like Quitting the server shouldn't be contingent on some shelled/piped process that's gone rogue.

There's no way really to prevent this. You can run an infinite loop in the language, and then the language will be unable to stop the server, just as in the case of a time-consuming system call that's running synchronously. If you run "killall scsynth" from the terminal (outside the control of the language), that should work.

Bottom line is, if the language is blocked, then it's blocked and you can't expect it to do nice things like stop servers.

@scztt
Copy link
Contributor

scztt commented Jun 28, 2015

Sorry, I should have been more specific... yes, the enhancement is to make the speech call (or, actually, all of the unixCmd related methods) non-blocking. This is actually a big problem for Quarks at the moment, as it will hang sclang in case of any git connection problem for example. I was going to close, as the non-blocking thing is already tracked in a bug elsewhere I believe, but I figured I'd let @ceremona respond / do the honors if there's no further discussion to be had.

@ceremona
Copy link
Author

Nothing more to say. You can close or do whatever is appropriate. Thanks folks. Process does kill for the outside terminal process as expected.

@telephon
Copy link
Member

telephon commented Jul 1, 2015

make … all of the unixCmd related methods) non-blocking.

it would be good if this were optional, as it may break code in subtle ways.

@danstowell
Copy link
Member

It would certainly change the timing of various command sequences that included unixCmds, and would definitely be likely to break code which expected completion ie blocking. No, there should be no such change.

Some confusion in the above discussion: firstly, unixCmd is already non-blocking. we have systemCmd for blocking. But more importantly, .speak is implemented as a primitive on OSX, not a shell command. Ignore the shell discussion, it's irrelevant.

@vivid-synth vivid-synth added the comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" label Aug 3, 2016
@nhthn nhthn changed the title Simple SC tweet freezes my SC server and doesn't allow me to killall/reboot/cmd"." Speech synthesis blocks interpreter Sep 29, 2016
@nhthn
Copy link
Contributor

nhthn commented Dec 16, 2016

Closing because Speech has been removed entirely.

@nhthn nhthn closed this as completed Dec 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" enhancement known issue
Projects
None yet
Development

No branches or pull requests

8 participants