aiarena / aiarena-stream

GNU General Public License v3.0
42 stars 5 forks source link

Fix voice announcement playing for the previous replay #89

Closed lladdy closed 2 years ago

lladdy commented 2 years ago

It appears the voice announcement is playing for the most recent replay, not the replay that's about to be played.

Might be due to something not being updated before the voice announcement is run.

opelolo commented 2 years ago

Hi, I'm a first time open source contributor and would love to give this a try. Could you please elaborate on what is expected to be done here?

opelolo commented 2 years ago

Where do I find the source code that needs to be rectified?

lladdy commented 2 years ago

Welcome @opelolo

I think the code that triggers the voice announcement is here: https://github.com/aiarena/aiarena-twitch/blob/master/aiarena-player.py#L155

It probably needs to be moved to run before the ExampleObserver.exe command is run. I suspect the ExampleObserver.exe command blocks while the SC2 replay is running, and so the voice announcement then runs afterwards. It's also possible that both could be run in simultaneously.

maitreyi14522 commented 2 years ago

hi! is this issue resolved or is someone working on it?

opelolo commented 2 years ago

Welcome @opelolo

I think the code that triggers the voice announcement is here: https://github.com/aiarena/aiarena-twitch/blob/master/aiarena-player.py#L155

It probably needs to be moved to run before the ExampleObserver.exe command is run. I suspect the ExampleObserver.exe command blocks while the SC2 replay is running, and so the voice announcement then runs afterwards. It's also possible that both could be run in simultaneously.

Thanks. I will work on it then. Please assign the issue to me. Thanks

opelolo commented 2 years ago

hi! is this issue resolved or is someone working on it?

I'm on it

opelolo commented 2 years ago

@lladdy hi,

I managed to create a command to run the voice announcement code before the ExampleObserver.exe. Please review and give me feedback. Not sure I did the right thing. Thank you

ratosh commented 2 years ago

Possibly ExampleObserver blocks the script flow until game ends. Moving TTS announcement to before running it should fix it.

lladdy commented 2 years ago

Fixed in https://github.com/aiarena/aiarena-twitch/pull/96