GameSentenceMiner 2.9.27__py3-none-any.whl → 2.9.28__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/util/downloader/oneocr_dl.py +10 -6
- GameSentenceMiner/vad.py +7 -5
- {gamesentenceminer-2.9.27.dist-info → gamesentenceminer-2.9.28.dist-info}/METADATA +2 -2
- {gamesentenceminer-2.9.27.dist-info → gamesentenceminer-2.9.28.dist-info}/RECORD +8 -8
- {gamesentenceminer-2.9.27.dist-info → gamesentenceminer-2.9.28.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.9.27.dist-info → gamesentenceminer-2.9.28.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.9.27.dist-info → gamesentenceminer-2.9.28.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.9.27.dist-info → gamesentenceminer-2.9.28.dist-info}/top_level.txt +0 -0
@@ -61,9 +61,9 @@ class Downloader:
|
|
61
61
|
Main function to attempt download and extraction.
|
62
62
|
Tries official source first, then a fallback URL.
|
63
63
|
"""
|
64
|
-
if checkdir(self.oneocr_dir):
|
65
|
-
|
66
|
-
|
64
|
+
# if checkdir(self.oneocr_dir):
|
65
|
+
# print("Files already exist in cache.")
|
66
|
+
# return True
|
67
67
|
|
68
68
|
try:
|
69
69
|
print("Attempting to download from official source...")
|
@@ -74,7 +74,7 @@ class Downloader:
|
|
74
74
|
print(f"Download from official source failed: {stringfyerror(e)}")
|
75
75
|
print("Attempting to download from fallback URL...")
|
76
76
|
try:
|
77
|
-
fallback_url =
|
77
|
+
fallback_url = "https://gsm.beangate.us/oneocr.zip"
|
78
78
|
self.downloadx(fallback_url)
|
79
79
|
print("Download and extraction from fallback URL successful.")
|
80
80
|
return True
|
@@ -195,7 +195,7 @@ class Downloader:
|
|
195
195
|
|
196
196
|
def downloadx(self, url: str):
|
197
197
|
"""Downloads a zip file from a URL and extracts it."""
|
198
|
-
print(f"Downloading from fallback URL
|
198
|
+
print(f"Downloading from fallback URL")
|
199
199
|
# Added accept-language to the fallback download as well for consistency
|
200
200
|
headers = {
|
201
201
|
"accept-language": "en-US,en;q=0.9",
|
@@ -239,5 +239,9 @@ if __name__ == "__main__":
|
|
239
239
|
downloader = Downloader()
|
240
240
|
if downloader.download_and_extract():
|
241
241
|
print("SnippingTool files are ready.")
|
242
|
+
print("Press Ctrl+C or X on window to exit.")
|
243
|
+
input()
|
242
244
|
else:
|
243
|
-
print("Failed to
|
245
|
+
print("Failed to download and extract SnippingTool files. You may need to follow instructions at https://github.com/AuroraWright/oneocr")
|
246
|
+
print("Press Ctrl+C or X on window to exit.")
|
247
|
+
input()
|
GameSentenceMiner/vad.py
CHANGED
@@ -102,7 +102,7 @@ class VADProcessor(ABC):
|
|
102
102
|
for i in range(len(segments)):
|
103
103
|
segment = segments[i]
|
104
104
|
logger.info(segment)
|
105
|
-
if i < len(segments) - 1 and (segments[i + 1]['start'] - segment['end']) < padding * 2:
|
105
|
+
if i < len(segments) - 1 and (segments[i + 1]['start'] - segment['end']) < (padding * 2 + padding / 2):
|
106
106
|
logger.info(f"Adjusting segment {segments[i + 1]} due to insufficient padding.")
|
107
107
|
current_start = segment['start'] if current_start is None else current_start
|
108
108
|
continue
|
@@ -110,7 +110,7 @@ class VADProcessor(ABC):
|
|
110
110
|
os.path.join(get_temporary_directory(), "segment." + get_config().audio.extension))
|
111
111
|
files.append(temp_file)
|
112
112
|
ffmpeg_threads.append(run_new_thread(
|
113
|
-
lambda: ffmpeg.trim_audio(input_audio, (current_start if current_start else segment['start']) - padding, segment['end'] + padding, temp_file,
|
113
|
+
lambda: ffmpeg.trim_audio(input_audio, (current_start if current_start else segment['start']) - (padding * 2), segment['end'] + (padding / 2), temp_file,
|
114
114
|
trim_beginning=True)))
|
115
115
|
current_start = None
|
116
116
|
time.sleep(0.1) # Small delay to ensure unique file names
|
@@ -371,8 +371,10 @@ class GroqVADProcessor(VADProcessor):
|
|
371
371
|
|
372
372
|
vad_processor = VADSystem()
|
373
373
|
|
374
|
-
# test_vad =
|
375
|
-
#
|
374
|
+
# test_vad = WhisperVADProcessor()
|
375
|
+
#
|
376
376
|
# if os.path.exists(r"C:\Users\Beangate\GSM\Electron App\test\after_splice.opus"):
|
377
377
|
# os.remove(r"C:\Users\Beangate\GSM\Electron App\test\after_splice.opus")
|
378
|
-
#
|
378
|
+
# get_config().vad.cut_and_splice_segments = True
|
379
|
+
# get_config().vad.splice_padding = 0.3
|
380
|
+
# test_vad.process_audio(r"C:\Users\Beangate\GSM\Electron App\test\temp_audio.opus", r"C:\Users\Beangate\GSM\Electron App\test\after_splice.opus", None)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: GameSentenceMiner
|
3
|
-
Version: 2.9.
|
3
|
+
Version: 2.9.28
|
4
4
|
Summary: A tool for mining sentences from games.
|
5
5
|
Author-email: Beangate <bpwhelan95@gmail.com>
|
6
6
|
License: MIT License
|
@@ -82,7 +82,7 @@ Audio: https://github.com/user-attachments/assets/2d7b3967-cd5c-4132-b489-75058e
|
|
82
82
|
|
83
83
|
### OCR
|
84
84
|
|
85
|
-
GSM
|
85
|
+
GSM runs a fork of [OwOCR](https://github.com/AuroraWright/owocr/) to provide accurate text capture from games that do not have a hook. Here are some improvements GSM makes on stock OwOCR:
|
86
86
|
|
87
87
|
* **Easier Setup**: With GSM's managed Python install, setup is only a matter of clicking a few buttons.
|
88
88
|
|
@@ -4,7 +4,7 @@ GameSentenceMiner/config_gui.py,sha256=xQXFrDfsjbWxuX0PwGn2jjv0mfRZEZ_MdUU3iMASi
|
|
4
4
|
GameSentenceMiner/gametext.py,sha256=nAwGMQSrmc6sUAw-OAURK2n6MG5Ecm6psJ7YF9q5KTA,6623
|
5
5
|
GameSentenceMiner/gsm.py,sha256=4m_M_Y-2SVC05CQh8YbMUSw-vu2sBpn6o7bckIV0BQE,24184
|
6
6
|
GameSentenceMiner/obs.py,sha256=YG8LwBf9BTsGbROm_Uq6LhFDSrbf3jgogp78rBbJq94,14728
|
7
|
-
GameSentenceMiner/vad.py,sha256=
|
7
|
+
GameSentenceMiner/vad.py,sha256=2nB35Sz2JV1P8fdn435uOW7FGA1N9noNifTEQXBL61Y,16792
|
8
8
|
GameSentenceMiner/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
9
|
GameSentenceMiner/ai/ai_prompting.py,sha256=0jBAnngNwmc3dqJiVWe_QRy4Syr-muV-ML2rq0FiUtU,10215
|
10
10
|
GameSentenceMiner/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -44,7 +44,7 @@ GameSentenceMiner/util/communication/websocket.py,sha256=TbphRGmxVrgEupS7tNdifsm
|
|
44
44
|
GameSentenceMiner/util/downloader/Untitled_json.py,sha256=RUUl2bbbCpUDUUS0fP0tdvf5FngZ7ILdA_J5TFYAXUQ,15272
|
45
45
|
GameSentenceMiner/util/downloader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
46
|
GameSentenceMiner/util/downloader/download_tools.py,sha256=mvnOjDHFlV1AbjHaNI7mdnC5_CH5k3N4n1ezqzzbzGA,8139
|
47
|
-
GameSentenceMiner/util/downloader/oneocr_dl.py,sha256=
|
47
|
+
GameSentenceMiner/util/downloader/oneocr_dl.py,sha256=w7WbPad2LTuz3TAKtJlrslLQlUe-gJMQfOnDwmO98h4,10341
|
48
48
|
GameSentenceMiner/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
49
49
|
GameSentenceMiner/web/service.py,sha256=1m27LxMHbR-9H6VM7uBoWdvhUafefyYoRXqZHCOZ53A,5674
|
50
50
|
GameSentenceMiner/web/texthooking_page.py,sha256=v4fh79uAO9jM-ZKoLAlLOBaMTn02GfNGAOuxZUXfs-k,15536
|
@@ -61,9 +61,9 @@ GameSentenceMiner/web/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
|
|
61
61
|
GameSentenceMiner/web/templates/index.html,sha256=HZKiIjiGJV8PGQ9T2aLDUNSfJn71qOwbYCjbRuSIjpY,213583
|
62
62
|
GameSentenceMiner/web/templates/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
|
63
63
|
GameSentenceMiner/web/templates/utility.html,sha256=3flZinKNqUJ7pvrZk6xu__v67z44rXnaK7UTZ303R-8,16946
|
64
|
-
gamesentenceminer-2.9.
|
65
|
-
gamesentenceminer-2.9.
|
66
|
-
gamesentenceminer-2.9.
|
67
|
-
gamesentenceminer-2.9.
|
68
|
-
gamesentenceminer-2.9.
|
69
|
-
gamesentenceminer-2.9.
|
64
|
+
gamesentenceminer-2.9.28.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
65
|
+
gamesentenceminer-2.9.28.dist-info/METADATA,sha256=v92y67iQDu6sjMIrEYM0F-s2kCP1JyChxZyjQGJR64k,7275
|
66
|
+
gamesentenceminer-2.9.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
67
|
+
gamesentenceminer-2.9.28.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
68
|
+
gamesentenceminer-2.9.28.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
69
|
+
gamesentenceminer-2.9.28.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|