|
Moy Newbie
Joined: 06 Oct 2015 Posts: 1
|
Posted: Tue Oct 06, 2015 4:24 pm
%comcreate and #call blocking the main thread |
A little bit of googling revealed that you can easily have CMUD do TTS
Code: |
#var sapi %comcreate("Sapi.SpVoice")
#call @sapi.Speak("Stuff and Junk") |
However when something like this is being called, the main CMUD thread is being blocked, as in I cannot type, or see text that's happening at once.
Is there any work around to have the #call run in another thread so one could simple use TTS without locking on the main thread, or is there a better alternative to using the Sapi.SPVoice com object?
Edit:
Well, it looks like Speak(TXT, FLAGS) has a flag for making it async. So I guess I don't really quite need to know now if there's an unblocking mode for this, but if it is at all possible, I'd still like to know in case of something else in the future. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Tue Oct 06, 2015 6:31 pm |
putting
#WAIT 0
before a long script that might otherwise cause CMUD to hang will usually shunt the code off into its own #THREAD and allow you to still do things while it processes.
Have to admit, i have not dealt much with COM objects. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|