Closed dovochi closed 3 years ago
Genshin is on the second monitor
Can you try to check whether is app working when game is on primary monitor? I believe currently the code is looking only for first monitor if game is not windowed.
I'm out of quests at the moment. Is there any place I can go to in order to test this?
Is there any place I can go to in order to test this?
I don't know. One way is to logout from your main account and create new one to test it.
I've added support for multiple monitors (https://github.com/tmarenko/GenshinImpact_PaimonShutUp/commit/7b8676748ee5246d3a3fd307db9a3461bc53f566) and tested it with my second monitor, seems to work fine.
You can download updated main.py
: https://raw.githubusercontent.com/tmarenko/GenshinImpact_PaimonShutUp/main/main.py
and replace old one with it.
I just downloaded the new main.py file and ran the start.bat file again but I can still hear Paimon talking. The command prompt window still doesn't show anything beyond "Ready for Paimon!". I'm using my laptop screen only at the moment.
I also tried using windowed and full screen modes on both the laptop monitor and the external one but it's still not working. Do I need to put the app folder in a specific place or launch it before the game?
Do I need to put the app folder in a specific place or launch it before the game?
No you don't. Your in-game language is English?
The UI is English but voice over is Japanese. I'm downloading the English voice file to test.
I'm downloading the English voice file to test.
In-game voice doesn't matter, script is looking for "Paimon" name in dialogue. I think script can't see her name in dialogue but I'm not sure why.
I just tried the English voice and yeah it didn't work either. I also tried adjusting the dialogue volume but that didn't trigger the command prompt at all
I've edit main.py
to save screenshots of the script's proccess:
https://raw.githubusercontent.com/tmarenko/GenshinImpact_PaimonShutUp/debug/main.py
Try to download and replace it with old one.
With this edit, script will create screenshots:
windowed.png
or all_screen.png
to check if capturing the game is working correctly:
frame.png
to check if Paimon's name is on screen:
and bw_frame.png
is black&white Paimon's name to recognize it properly:
Try to run the script and see if your .png files looks the same.
all_screen.png looks like the first pic, showing the current screen as bordered window. but the frame.png and bw_frame.png are both all black without any text at all. The command prompt window is spamming the below line in repeat
Found text:
windowed.png is switching between 0KB and 6KB size every second or so.
I copied windowed.png while it was a 6KB file to see and the pic is all black at 1686 x 1079 px.
Another updated main.py
: https://raw.githubusercontent.com/tmarenko/GenshinImpact_PaimonShutUp/debug/main.py
The output should be similar to:
Waiting for GenshinImpact.exe process
Ready for Paimon!
Fullscreen: True, borders: (0, 0, 1920, 1080)
Got game's image 1920x1080, cropping by (889.2474078073014, 850.1901497320653, 1030.3835688364857, 894.8910822396474)
Found text: Paimon
I copied windowed.png while it was a 6KB file to see and the pic is all black at 1686 x 1079 px.
You should look at windowed.png
only if you run game in windowed mode. Otherwise the screen would be in all_screen.png
Also you could test this code in any dialogue basically:
I'm seeing the following
Found text: ianinm
Fullscreen: True, borders: (117, 0, 1803, 1079)
Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218)
Found text: ianinm
Fullscreen: True, borders: (117, 0, 1803, 1079)
Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218)
Found text: Paimon
Paimon, shut up!
Fullscreen: True, borders: (117, 0, 1803, 1079)
Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218)
Found text: ianinm
Unmuting the game.
Fullscreen: True, borders: (117, 0, 1803, 1079)
Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218)
Found text: ianinm
Fullscreen: False, borders: (117, 0, 1803, 1079)
Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218)
However, the current NPC is Keqing and the game's sound was muted during her dialogue, not Paimon when it detected Paimon. It seems to be delayed by several seconds.
I'm running the game in windowed mode but strangely, windowed.png
is switching between 0KB and 6KB (which is an all black pic with no text). all_screen.png
is showing the current screen which is in windowed mode.
not Paimon when it detected Paimon
Yeap, I see. Too much overlook only for Paimon. As again, here updated main.py
: https://raw.githubusercontent.com/tmarenko/GenshinImpact_PaimonShutUp/debug/main.py
Should recognize other characters better.
It seems to be delayed by several seconds.
It is, I've added 2 sec delay just for testing purposes.
Looks like the OCR engine is misreading certain characters
Found text: Pdimon Fullscreen: True, borders: (245, 0, 1931, 1079) Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218) Found text: Koqing Fullscreen: True, borders: (245, 0, 1931, 1079) Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218) Found text: Koqing Fullscreen: True, borders: (245, 0, 1931, 1079) Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218)
It read Keqing as Koqing and Paimon as Pdimon.
I just switched to using my laptop monitor's only. Does this matter at all?
It read Keqing as Koqing and Paimon as Pdimon.
I forgor that could happen =) Another update: https://raw.githubusercontent.com/tmarenko/GenshinImpact_PaimonShutUp/debug/main.py Should work for misreading characters now.
I just switched to using my laptop monitor's only. Does this matter at all?
I believe it doesn't, as soon as frame.png
contains name of character.
It seems to be working now with some delays.
Found text: Koqing Fullscreen: True, borders: (245, 0, 1931, 1079) Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218) Found text: Puimon Paimon, shut up! Fullscreen: True, borders: (245, 0, 1931, 1079) Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218) Found text: Puimon Fullscreen: True, borders: (245, 0, 1931, 1079) Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218) Found text: Puimon Fullscreen: True, borders: (245, 0, 1931, 1079) Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218) Found text: Puimon Fullscreen: False, borders: (245, 0, 1931, 1079) Got game's image 1686x1079, cropping by (780.8703799807865, 849.4029366304615, 904.805571384539, 894.0624793857218) Found text: Unmuting the game.
Good. Here is version without debug saving and delays: https://raw.githubusercontent.com/tmarenko/GenshinImpact_PaimonShutUp/a1a22ef5e58e3d33804d5552b7be39de0f1bfeaf/main.py You can use it for now. I'll update main branch and release tomorrow.
I just tested the latest version and it had a fraction of a second of delay. Paimon managed to get a word out before getting muted. As soon as the dialogue changed, the game was unmuted. Is it possible to completely get rid of the voice? It's okay if not though. This is way, way better than having to listen to whole sentences. You just saved my ears from so much pain. Thank you so much!
Wait. I just switched back to full screen mode on my second screen and it doesn't work anymore. Any ideas why?
Actually, it seems to only work in windowed mode.
The script didn't mute Paimon if something overlaid on top of the dialogue before she started talking.
It also didn't mute her when she talked while off-screen, such as when moving around and not in a cutscene.
it seems to only work in windowed mode
I think I've fixed in https://github.com/tmarenko/GenshinImpact_PaimonShutUp/commit/b0d8a5e4f4a80947f56428c6a8af6fffdbfbeb42
didn't mute her when she talked while off-screen
Now it should
didn't mute Paimon if something overlaid on top of the dialogue
That's okay, may be? I'm not sure how to overlook for dialogue overlays so I think to leave it as it is.
I just tested the latest version and it had a fraction of a second of delay. Paimon managed to get a word out before getting muted. As soon as the dialogue changed, the game was unmuted. Is it possible to completely get rid of the voice?
Yeah delays are inevitable. Mostly it's image grabbing that require too much time to complete. One way is to switch from Python to C++, that would reduce delays and size of external libs but this requires some work and time. Maybe one day sometimes
The latest version kept muting and unmuting rapidly when Paimon was still talking off-screen. Maybe that's due to the changing frames while you're moving? I don't mind it all that much, really, since this happens way less than the cutscene dialogues. It's working correctly in full screen mode now, though. As for the delay, that's totally okay! It's actually kinda funny and makes me laugh, like you're actually shutting her up. Thanks for your awesome work!
I've tried to switch from Python to C++: https://github.com/tmarenko/GenshinImpact_PaimonShutUp/releases/tag/0.4.0 Much lesser archive size and screen capturing should be quicker also.
Strangely, neither the old and new version worked anymore, either in windowed and full screen mode. This happened after I rebooted.
Hold that thought. I just tried running the C++ version as admin and it's working in windowed mode on single display mode (laptop screen only). I'll test on full screen and also on second screen as well.
It works great in full screen mode on both internal and external monitors. CPU usage is a bit high at 10% (a quarter of what Genshin is using) but that's okay. It seems to work much faster at muting Paimon than the Python version. It also works correctly when she talks off screen as well as when you're moving. Awesome work! Thanks so much for this. I'll be testing it for the next few days to see if any other issue shows up.
Okay so the C++ version needs to be run as admin but it seems to only work for about 10 min before crashing.
script just crashed again, so I'd say around 20-30 min?
script just crashed again, so I'd say around 20-30 min?
I'm debugging it right now but no crashes for me so far. Have you done something before crash? Alt+tab, changing monitor/resolution, etc.?
Ok, I've got it. Script crashes trying to strip \n\n
string for example.
Should be fixed in https://github.com/tmarenko/GenshinImpact_PaimonShutUp/releases/tag/0.4.1
The latest version seems to be working correctly so far. I'll keep testing it for the next few days and will keep you updated. Thanks!
I launched the start.bat file and the last line I got from the command prompt window was "Ready for Paimon!". When Paimon spoke, nothing happened in the command prompt window. I tried using the English and Japanese voices but neither of them worked. I'm using Windows 10 build 19041, DirectX 12. Genshin is on the second monitor at 1920x1080 full screen, max settings. I'm using controller.