GameSentenceMiner 2.2.2__py3-none-any.whl → 2.2.2.post2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- GameSentenceMiner/gsm.py +5 -2
- GameSentenceMiner/obs.py +2 -1
- {GameSentenceMiner-2.2.2.dist-info → GameSentenceMiner-2.2.2.post2.dist-info}/METADATA +14 -3
- {GameSentenceMiner-2.2.2.dist-info → GameSentenceMiner-2.2.2.post2.dist-info}/RECORD +7 -7
- {GameSentenceMiner-2.2.2.dist-info → GameSentenceMiner-2.2.2.post2.dist-info}/WHEEL +0 -0
- {GameSentenceMiner-2.2.2.dist-info → GameSentenceMiner-2.2.2.post2.dist-info}/entry_points.txt +0 -0
- {GameSentenceMiner-2.2.2.dist-info → GameSentenceMiner-2.2.2.post2.dist-info}/top_level.txt +0 -0
GameSentenceMiner/gsm.py
CHANGED
@@ -6,7 +6,6 @@ from subprocess import Popen
|
|
6
6
|
|
7
7
|
import keyboard
|
8
8
|
import psutil
|
9
|
-
import win32api
|
10
9
|
from PIL import Image, ImageDraw
|
11
10
|
from pystray import Icon, Menu, MenuItem
|
12
11
|
from watchdog.events import FileSystemEventHandler
|
@@ -27,6 +26,9 @@ from GameSentenceMiner.ffmpeg import get_audio_and_trim
|
|
27
26
|
from GameSentenceMiner.gametext import get_line_timing
|
28
27
|
from GameSentenceMiner.util import *
|
29
28
|
|
29
|
+
if is_windows():
|
30
|
+
import win32api
|
31
|
+
|
30
32
|
obs_process: Popen
|
31
33
|
procs_to_close = []
|
32
34
|
settings_window: config_gui.ConfigApp = None
|
@@ -379,7 +381,8 @@ def main(reloading=False, do_config_input=True):
|
|
379
381
|
# Register signal handlers for graceful shutdown
|
380
382
|
signal.signal(signal.SIGTERM, handle_exit()) # Handle `kill` commands
|
381
383
|
signal.signal(signal.SIGINT, handle_exit()) # Handle Ctrl+C
|
382
|
-
|
384
|
+
if is_windows():
|
385
|
+
win32api.SetConsoleCtrlHandler(handle_exit())
|
383
386
|
|
384
387
|
util.run_new_thread(run_tray)
|
385
388
|
|
GameSentenceMiner/obs.py
CHANGED
@@ -79,7 +79,8 @@ def on_disconnect(obs):
|
|
79
79
|
def connect_to_obs(start_replay=False):
|
80
80
|
global client
|
81
81
|
if get_config().obs.enabled:
|
82
|
-
|
82
|
+
if util.is_windows():
|
83
|
+
get_obs_websocket_config_values()
|
83
84
|
client = obsws(host=get_config().obs.host, port=get_config().obs.port,
|
84
85
|
password=get_config().obs.password, authreconnect=1, on_connect=on_connect,
|
85
86
|
on_disconnect=on_disconnect)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: GameSentenceMiner
|
3
|
-
Version: 2.2.2
|
3
|
+
Version: 2.2.2.post2
|
4
4
|
Summary: A tool for mining sentences from games. Update: Use ffprobe from GSM Directory
|
5
5
|
Author-email: Beangate <bpwhelan95@gmail.com>
|
6
6
|
License: MIT License
|
@@ -9,7 +9,7 @@ Project-URL: Repository, https://github.com/bpwhelan/GameSentenceMiner
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
11
11
|
Classifier: Operating System :: OS Independent
|
12
|
-
Requires-Python: >=3.
|
12
|
+
Requires-Python: >=3.10
|
13
13
|
Description-Content-Type: text/markdown
|
14
14
|
Requires-Dist: requests~=2.32.3
|
15
15
|
Requires-Dist: watchdog~=5.0.2
|
@@ -30,7 +30,7 @@ Requires-Dist: ttkbootstrap~=1.10.1
|
|
30
30
|
Requires-Dist: dataclasses_json~=0.6.7
|
31
31
|
Requires-Dist: numpy
|
32
32
|
Requires-Dist: pystray
|
33
|
-
Requires-Dist: pywin32
|
33
|
+
Requires-Dist: pywin32; sys_platform == "win32"
|
34
34
|
|
35
35
|
# Game Sentence Miner
|
36
36
|
|
@@ -43,6 +43,17 @@ Short Demo (Watch this first): https://www.youtube.com/watch?v=J2At52oWieU
|
|
43
43
|
|
44
44
|
Installation: https://www.youtube.com/watch?v=b-L4g9tA508
|
45
45
|
|
46
|
+
## How Does it Work?
|
47
|
+
|
48
|
+
This is the #1 question I get, and knowing this helps clear up a lot of misunderstanding on issues you may encounter while using GSM.
|
49
|
+
|
50
|
+
1. The beginning of the voiceline is marked by a text event. Usually this comes in the form of an event from textractor/agent, or any other texthooking engine. GSM handles both listening for clipboard copy, as well as on a websocket server (configurable in GSM).
|
51
|
+
2. The end of the voiceline is found using a Voice Activation Detection (VAD) library running on your local machine. ([Example](https://github.com/snakers4/silero-vad))
|
52
|
+
|
53
|
+
That's it.
|
54
|
+
|
55
|
+
There are settings in GSM that may help accomodate for a poor hook, but if you encounter wild inconsistencies in your audio, it's likely due to a poorly timed hook, very loud BGM, or some other external factor, not GSM. I have not touched the audio trimming logic for months and it's been excellent for many many people across many games.
|
56
|
+
|
46
57
|
## Features:
|
47
58
|
|
48
59
|
- **OBS Replay Buffer**: Constantly records the last X seconds of gameplay.
|
@@ -4,10 +4,10 @@ GameSentenceMiner/config_gui.py,sha256=d9bQUUI-QR879FJJsROcQ4Y7gk08h95uPNGN1DWdI
|
|
4
4
|
GameSentenceMiner/configuration.py,sha256=Cw5vUF74ZKcSinbciNMiLKpMO8M6sf-0THokHO_31nE,14010
|
5
5
|
GameSentenceMiner/ffmpeg.py,sha256=txTpco-IGWtfF8vIiWUzrtgI5TA1xPVIK-WJWxU02mM,10878
|
6
6
|
GameSentenceMiner/gametext.py,sha256=pAovclbBSLigoyJMcdhNrieFDDPLJY3htHBGhjQ2Xk0,4081
|
7
|
-
GameSentenceMiner/gsm.py,sha256=
|
7
|
+
GameSentenceMiner/gsm.py,sha256=6LX3kFhyB1QoXFr5jzGZvONzQa6_PmPn_R7o2AiRRqA,16493
|
8
8
|
GameSentenceMiner/model.py,sha256=oh8VVT8T1UKekbmP6MGNgQ8jIuQ_7Rg4GPzDCn2kJo8,1999
|
9
9
|
GameSentenceMiner/notification.py,sha256=WBaQWoPNhW4XqdPBUmxPBgjk0ngzH_4v9zMQ-XQAKC8,2010
|
10
|
-
GameSentenceMiner/obs.py,sha256=
|
10
|
+
GameSentenceMiner/obs.py,sha256=3Flcjxy812VpF78EPI7sxlGx6yyM3GfqzlinW17SK20,6231
|
11
11
|
GameSentenceMiner/package_updater.py,sha256=KBJwLrlcAyoGHNNmDSVdPgWawqfWiIWOodcZhYheoms,1486
|
12
12
|
GameSentenceMiner/util.py,sha256=cgKpPfRpouWI6tjE_35MWp8nXqRzXs3LvsYXWm5_DOg,4584
|
13
13
|
GameSentenceMiner/downloader/Untitled_json.py,sha256=RUUl2bbbCpUDUUS0fP0tdvf5FngZ7ILdA_J5TFYAXUQ,15272
|
@@ -17,8 +17,8 @@ GameSentenceMiner/vad/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
17
17
|
GameSentenceMiner/vad/silero_trim.py,sha256=syDJX_KbFmdyFFtnQqYTD0tICsUCJizYhs-atPgXtxA,1549
|
18
18
|
GameSentenceMiner/vad/vosk_helper.py,sha256=-AAwK0cgOC5rK3_gL0sQgrPJ75E49g_PxZR4d5ckwc4,5826
|
19
19
|
GameSentenceMiner/vad/whisper_helper.py,sha256=bpR1HVnJRn9H5u8XaHBqBJ6JwIjzqn-Fajps8QmQ4zc,3411
|
20
|
-
GameSentenceMiner-2.2.2.dist-info/METADATA,sha256=
|
21
|
-
GameSentenceMiner-2.2.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
22
|
-
GameSentenceMiner-2.2.2.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
23
|
-
GameSentenceMiner-2.2.2.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
24
|
-
GameSentenceMiner-2.2.2.dist-info/RECORD,,
|
20
|
+
GameSentenceMiner-2.2.2.post2.dist-info/METADATA,sha256=soTcs3hdtc4XGqR1wsuLUV4fPwVEBrzCCW8gy97pcn8,10131
|
21
|
+
GameSentenceMiner-2.2.2.post2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
22
|
+
GameSentenceMiner-2.2.2.post2.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
23
|
+
GameSentenceMiner-2.2.2.post2.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
24
|
+
GameSentenceMiner-2.2.2.post2.dist-info/RECORD,,
|
File without changes
|
{GameSentenceMiner-2.2.2.dist-info → GameSentenceMiner-2.2.2.post2.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|