GameSentenceMiner 2.4.6__py3-none-any.whl → 2.4.7__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 +20 -1
- {gamesentenceminer-2.4.6.dist-info → gamesentenceminer-2.4.7.dist-info}/METADATA +2 -2
- {gamesentenceminer-2.4.6.dist-info → gamesentenceminer-2.4.7.dist-info}/RECORD +7 -7
- {gamesentenceminer-2.4.6.dist-info → gamesentenceminer-2.4.7.dist-info}/LICENSE +0 -0
- {gamesentenceminer-2.4.6.dist-info → gamesentenceminer-2.4.7.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.4.6.dist-info → gamesentenceminer-2.4.7.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.4.6.dist-info → gamesentenceminer-2.4.7.dist-info}/top_level.txt +0 -0
GameSentenceMiner/gsm.py
CHANGED
@@ -46,9 +46,28 @@ class VideoToAudioHandler(FileSystemEventHandler):
|
|
46
46
|
return
|
47
47
|
if event.src_path.endswith(".mkv") or event.src_path.endswith(".mp4"): # Adjust based on your OBS output format
|
48
48
|
logger.info(f"MKV {event.src_path} FOUND, RUNNING LOGIC")
|
49
|
-
|
49
|
+
self.wait_for_stable_file(event.src_path)
|
50
50
|
self.convert_to_audio(event.src_path)
|
51
51
|
|
52
|
+
@staticmethod
|
53
|
+
def wait_for_stable_file(file_path, timeout=10, check_interval=0.5):
|
54
|
+
elapsed_time = 0
|
55
|
+
last_size = -1
|
56
|
+
|
57
|
+
while elapsed_time < timeout:
|
58
|
+
try:
|
59
|
+
current_size = os.path.getsize(file_path)
|
60
|
+
if current_size == last_size:
|
61
|
+
return True
|
62
|
+
last_size = current_size
|
63
|
+
time.sleep(check_interval)
|
64
|
+
elapsed_time += check_interval
|
65
|
+
except Exception as e:
|
66
|
+
logger.warning(f"Error checking file size, will still try updating Anki Card!: {e}")
|
67
|
+
return False
|
68
|
+
logger.warning("File size did not stabilize within the timeout period. Continuing...")
|
69
|
+
return False
|
70
|
+
|
52
71
|
@staticmethod
|
53
72
|
def convert_to_audio(video_path):
|
54
73
|
try:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: GameSentenceMiner
|
3
|
-
Version: 2.4.
|
3
|
+
Version: 2.4.7
|
4
4
|
Summary: A tool for mining sentences from games. Update: Multi-Line Mining! Fixed!
|
5
5
|
Author-email: Beangate <bpwhelan95@gmail.com>
|
6
6
|
License: MIT License
|
@@ -42,7 +42,7 @@ game we are playing.
|
|
42
42
|
|
43
43
|
Short Demo (Watch this first): https://www.youtube.com/watch?v=FeFBL7py6HY
|
44
44
|
|
45
|
-
Installation: https://
|
45
|
+
Installation: https://youtu.be/h5ksXallc-o
|
46
46
|
|
47
47
|
## How Does it Work?
|
48
48
|
|
@@ -5,7 +5,7 @@ GameSentenceMiner/configuration.py,sha256=mbyIs0h9xh85_ZJkuqTgspkdfl7jeifpvlYofu
|
|
5
5
|
GameSentenceMiner/electron_messaging.py,sha256=fBk9Ipo0jg2OZwYaKe1Qsm05P2ftrdTRGgFYob7ZA-k,139
|
6
6
|
GameSentenceMiner/ffmpeg.py,sha256=vLBmQgkh23BS2vE5u7bli_1_3wFN5cB3VCgrAZ1VAL8,11197
|
7
7
|
GameSentenceMiner/gametext.py,sha256=VjWNdjHwWXWIwNOfYxud7EwIyg7t6zZ3IkmMhh8Vc0c,6819
|
8
|
-
GameSentenceMiner/gsm.py,sha256=
|
8
|
+
GameSentenceMiner/gsm.py,sha256=E9Hpbyzrv8FEFGBs-4Hf60m3sk0ps3OQdvB1n42AhRU,20164
|
9
9
|
GameSentenceMiner/model.py,sha256=oh8VVT8T1UKekbmP6MGNgQ8jIuQ_7Rg4GPzDCn2kJo8,1999
|
10
10
|
GameSentenceMiner/notification.py,sha256=WBaQWoPNhW4XqdPBUmxPBgjk0ngzH_4v9zMQ-XQAKC8,2010
|
11
11
|
GameSentenceMiner/obs.py,sha256=8ImXAVUWa4JdzwcBOEFShlZRZzh1dCvdpD1aEGhQfbU,6566
|
@@ -19,9 +19,9 @@ GameSentenceMiner/vad/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
19
19
|
GameSentenceMiner/vad/silero_trim.py,sha256=syDJX_KbFmdyFFtnQqYTD0tICsUCJizYhs-atPgXtxA,1549
|
20
20
|
GameSentenceMiner/vad/vosk_helper.py,sha256=HifeXKbEMrs81ZuuGxS67yAghu8TMXUP6Oan9i9dTxw,5938
|
21
21
|
GameSentenceMiner/vad/whisper_helper.py,sha256=bpR1HVnJRn9H5u8XaHBqBJ6JwIjzqn-Fajps8QmQ4zc,3411
|
22
|
-
gamesentenceminer-2.4.
|
23
|
-
gamesentenceminer-2.4.
|
24
|
-
gamesentenceminer-2.4.
|
25
|
-
gamesentenceminer-2.4.
|
26
|
-
gamesentenceminer-2.4.
|
27
|
-
gamesentenceminer-2.4.
|
22
|
+
gamesentenceminer-2.4.7.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
23
|
+
gamesentenceminer-2.4.7.dist-info/METADATA,sha256=dI3esUztI0x36z--5cvgZWQo0dKKH2vz_tlPXC-qy08,10309
|
24
|
+
gamesentenceminer-2.4.7.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
25
|
+
gamesentenceminer-2.4.7.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
26
|
+
gamesentenceminer-2.4.7.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
27
|
+
gamesentenceminer-2.4.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|