Awesome, I will try that out and see if I can find a solution.

In regards to the error message, I agree, something a bit more descriptive
probably could have pointed me in the right direction quicker. The
documentation says it pretty clearly, but I must have just missed it. Thank
you for your help!

On Sat, Jun 25, 2016 at 8:16 PM Benjamin Moran <[email protected]> wrote:

> OK, so in the documentation I can see the official description of
> StreamingSources is:  "StreamingSource
> <http://pyglet.readthedocs.io/en/pyglet-1.2-maintenance/api/pyglet/media/pyglet.media.StreamingSource.html#pyglet.media.StreamingSource>
> A source that is decoded as it is being played, and can only be queued
> once."
> So I guess that answers the question about why your original code didn't
> work!  I thin maybe the error message could be better. Right now it just
> says "already queued", but It might be better to say something like "Cannot
> queue StreamingSources more than once". That would immediately give users
> some idea that maybe that should at least find out what a StreamingSource
> is anyway, and why it's not going to work.
>
> About your speech code, I haven't had a chance to test it here, but I
> there shouldn't be anything specific to pyglet that would prevent running
> subprocesses. I would guess that the hang is caused by waiting for return
> codes or something.
>
> I've not used os.system in a long time, but it might be a good idea to use
> the subprocess module instead. The subprocess.run(["say",
> random.choice(hype)]) should work as you expect.
>
>
>
> On Sunday, June 26, 2016 at 12:59:31 AM UTC+9, Mitchell Barton wrote:
>
>> Yeah, I kept on getting the same error you mentioned of the source being
>> queued already if they weren't static. So setting them as static resources
>> was vital. I did have some problems with certain sounds, for some reason
>> one mp3 files on_player_eos event wasnt firing, but all the other sources I
>> had worked fine.
>>
>> I'm now trying to add a few other things to my code, running Terminal's
>> 'say' command on top of the music being played with pyglet. I play the
>> songs I have, and then have terminal pick random words out of a list that
>> then 'says' them repeatedly. It seems to work at first, but then freezes,
>> running the code forever and not responding to any window events until I
>> force quit the Python interpreter.
>>
>> So my question is, is it possible to run commands in the command line
>> while a pyglet application is running without the application freezing?
>>
>> Here is my code
>>
>> [image: Screen Shot 2016-06-25 at 9.40.23 AM.png][image: Screen Shot
>> 2016-06-25 at 9.43.08 AM.png]
>>
>> On Sat, Jun 25, 2016 at 9:57 AM Mitchell Barton <[email protected]>
>> wrote:
>>
>>> Yeah, I kept on getting the same error you mentioned of the source being
>>> queued already if they weren't static. So setting them as static resources
>>> was vital. I did have some problems with certain sounds, for some reason
>>> one mp3 files on_player_eos event wasnt firing, but all the other sources I
>>> had worked fine.
>>>
>>> I'm now trying to add a few other things to my code, running Terminal's
>>> 'say' command on top of the music being played with pyglet. I play the
>>> songs I have, and then have terminal pick random words out of a list that
>>> then 'says' them repeatedly. It seems to work at first, but then freezes,
>>> running the code forever and not responding to any window events until I
>>> force quit the Python interpreter.
>>>
>>> So my question is, is it possible to run commands in the command line
>>> while a pyglet application is running without the application freezing?
>>>
>>> Here is my code
>>>
>>> [image: Screen Shot 2016-06-25 at 9.40.23 AM.png][image: Screen Shot
>>> 2016-06-25 at 9.43.08 AM.png]
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "pyglet-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/pyglet-users/uxgMsN-i6Ro/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/pyglet-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to