GameSentenceMiner 2.8.25__py3-none-any.whl → 2.8.27__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/anki.py +7 -3
- GameSentenceMiner/ffmpeg.py +5 -5
- GameSentenceMiner/gsm.py +20 -17
- GameSentenceMiner/ocr/owocr_helper.py +1 -1
- GameSentenceMiner/owocr/owocr/config.py +25 -13
- GameSentenceMiner/owocr/owocr/ocr.py +103 -95
- GameSentenceMiner/owocr/owocr/run.py +602 -598
- GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py +3 -2
- GameSentenceMiner/vad/result.py +8 -0
- GameSentenceMiner/vad/silero_trim.py +3 -2
- GameSentenceMiner/vad/vosk_helper.py +3 -2
- GameSentenceMiner/vad/whisper_helper.py +3 -2
- {gamesentenceminer-2.8.25.dist-info → gamesentenceminer-2.8.27.dist-info}/METADATA +1 -1
- {gamesentenceminer-2.8.25.dist-info → gamesentenceminer-2.8.27.dist-info}/RECORD +18 -17
- {gamesentenceminer-2.8.25.dist-info → gamesentenceminer-2.8.27.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.8.25.dist-info → gamesentenceminer-2.8.27.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.8.25.dist-info → gamesentenceminer-2.8.27.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.8.25.dist-info → gamesentenceminer-2.8.27.dist-info}/top_level.txt +0 -0
@@ -1,8 +1,9 @@
|
|
1
1
|
from multiprocessing import Process, Manager
|
2
2
|
import mss
|
3
|
-
from PIL import Image
|
3
|
+
from PIL import Image
|
4
4
|
|
5
5
|
try:
|
6
|
+
from PIL import ImageTk
|
6
7
|
import tkinter as tk
|
7
8
|
selector_available = True
|
8
9
|
except:
|
@@ -85,7 +86,7 @@ def run_screen_selector(result):
|
|
85
86
|
|
86
87
|
def get_screen_selection():
|
87
88
|
if not selector_available:
|
88
|
-
raise ValueError('tkinter
|
89
|
+
raise ValueError('tkinter or PIL with tkinter support are not installed, unable to open picker')
|
89
90
|
|
90
91
|
with Manager() as manager:
|
91
92
|
res = manager.dict()
|
@@ -4,6 +4,7 @@ from silero_vad import load_silero_vad, read_audio, get_speech_timestamps
|
|
4
4
|
|
5
5
|
from GameSentenceMiner import configuration, ffmpeg
|
6
6
|
from GameSentenceMiner.configuration import *
|
7
|
+
from GameSentenceMiner.vad.result import VADResult
|
7
8
|
|
8
9
|
# Silero VAD setup
|
9
10
|
vad_model = load_silero_vad()
|
@@ -31,7 +32,7 @@ def process_audio_with_silero(input_audio, output_audio):
|
|
31
32
|
|
32
33
|
if not voice_activity:
|
33
34
|
logger.info("No voice activity detected in the audio.")
|
34
|
-
return False, 0, 0
|
35
|
+
return VADResult(False, 0, 0)
|
35
36
|
|
36
37
|
# Trim based on the first and last speech detected
|
37
38
|
start_time = voice_activity[0]['start'] if voice_activity else 0
|
@@ -40,4 +41,4 @@ def process_audio_with_silero(input_audio, output_audio):
|
|
40
41
|
# Trim the audio using FFmpeg
|
41
42
|
ffmpeg.trim_audio(input_audio, start_time + get_config().vad.beginning_offset, end_time + get_config().audio.end_offset, output_audio)
|
42
43
|
logger.info(f"Trimmed audio saved to: {output_audio}")
|
43
|
-
return True, start_time + get_config().vad.beginning_offset, end_time + get_config().audio.end_offset
|
44
|
+
return VADResult(True, start_time + get_config().vad.beginning_offset, end_time + get_config().audio.end_offset)
|
@@ -9,6 +9,7 @@ import vosk
|
|
9
9
|
|
10
10
|
from GameSentenceMiner import configuration, ffmpeg
|
11
11
|
from GameSentenceMiner.configuration import *
|
12
|
+
from GameSentenceMiner.vad.result import VADResult
|
12
13
|
|
13
14
|
ffmpeg_base_command_list = ["ffmpeg", "-hide_banner", "-loglevel", "error"]
|
14
15
|
vosk.SetLogLevel(-1)
|
@@ -127,7 +128,7 @@ def process_audio_with_vosk(input_audio, output_audio):
|
|
127
128
|
|
128
129
|
if not voice_activity:
|
129
130
|
logger.info("No voice activity detected in the audio.")
|
130
|
-
return False, 0, 0
|
131
|
+
return VADResult(False, 0, 0)
|
131
132
|
|
132
133
|
# Trim based on the first and last speech detected
|
133
134
|
start_time = voice_activity[0]['start'] if voice_activity else 0
|
@@ -142,7 +143,7 @@ def process_audio_with_vosk(input_audio, output_audio):
|
|
142
143
|
# Trim the audio using FFmpeg
|
143
144
|
ffmpeg.trim_audio(input_audio, start_time + get_config().vad.beginning_offset, end_time + get_config().audio.end_offset, output_audio)
|
144
145
|
logger.info(f"Trimmed audio saved to: {output_audio}")
|
145
|
-
return True, start_time + get_config().vad.beginning_offset, end_time + get_config().audio.end_offset
|
146
|
+
return VADResult(True, start_time + get_config().vad.beginning_offset, end_time + get_config().audio.end_offset)
|
146
147
|
|
147
148
|
|
148
149
|
def get_vosk_model():
|
@@ -6,6 +6,7 @@ from stable_whisper import WhisperResult
|
|
6
6
|
|
7
7
|
from GameSentenceMiner import configuration, ffmpeg
|
8
8
|
from GameSentenceMiner.configuration import *
|
9
|
+
from GameSentenceMiner.vad.result import VADResult
|
9
10
|
|
10
11
|
ffmpeg_base_command_list = ["ffmpeg", "-hide_banner", "-loglevel", "error"]
|
11
12
|
whisper_model = None
|
@@ -74,7 +75,7 @@ def process_audio_with_whisper(input_audio, output_audio):
|
|
74
75
|
|
75
76
|
if not voice_activity:
|
76
77
|
logger.info("No voice activity detected in the audio.")
|
77
|
-
return False, 0, 0
|
78
|
+
return VADResult(False, 0, 0)
|
78
79
|
|
79
80
|
# Trim based on the first and last speech detected
|
80
81
|
start_time = voice_activity[0]['start']
|
@@ -89,7 +90,7 @@ def process_audio_with_whisper(input_audio, output_audio):
|
|
89
90
|
# Trim the audio using FFmpeg
|
90
91
|
ffmpeg.trim_audio(input_audio, start_time + get_config().vad.beginning_offset, end_time + get_config().audio.end_offset, output_audio)
|
91
92
|
logger.info(f"Trimmed audio saved to: {output_audio}")
|
92
|
-
return True, start_time + get_config().vad.beginning_offset, end_time + get_config().audio.end_offset
|
93
|
+
return VADResult(True, start_time + get_config().vad.beginning_offset, end_time + get_config().audio.end_offset)
|
93
94
|
|
94
95
|
|
95
96
|
# Load Whisper model initially
|
@@ -1,11 +1,11 @@
|
|
1
1
|
GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
GameSentenceMiner/anki.py,sha256=
|
2
|
+
GameSentenceMiner/anki.py,sha256=I1rvmQry5mtdJHFqNYvG8dyV1A-mwgkCANXTtU-bRuQ,14491
|
3
3
|
GameSentenceMiner/config_gui.py,sha256=R7pUJDXCP7unGtBpuUjL0-8iWvY6LXRCYckHIrwkvF8,74207
|
4
4
|
GameSentenceMiner/configuration.py,sha256=ndnxuQbLfhMruHld-yK3UjWt1DcXlVhaLRZD8l6SJ0E,22562
|
5
5
|
GameSentenceMiner/electron_config.py,sha256=dGcPYCISPehXubYSzsDuI2Gl092MYK0u3bTnkL9Jh1Y,9787
|
6
|
-
GameSentenceMiner/ffmpeg.py,sha256=
|
6
|
+
GameSentenceMiner/ffmpeg.py,sha256=oYhWJgFMmW84vcYNw7sYLICZAX24KpgZbrR0VjuVqXQ,14672
|
7
7
|
GameSentenceMiner/gametext.py,sha256=VogQDs-VQ4dorqy8uvoklweeS58r3Th_yP-zn36e0u4,5556
|
8
|
-
GameSentenceMiner/gsm.py,sha256
|
8
|
+
GameSentenceMiner/gsm.py,sha256=-aAaCiIjoNK4G-XLUhj5kP3XKoc14GHr7JLka54pQT0,25611
|
9
9
|
GameSentenceMiner/model.py,sha256=JdnkT4VoPOXmOpRgFdvERZ09c9wLN6tUJxdrKlGZcqo,5305
|
10
10
|
GameSentenceMiner/notification.py,sha256=FY39ChSRK0Y8TQ6lBGsLnpZUFPtFpSy2tweeXVoV7kc,2809
|
11
11
|
GameSentenceMiner/obs.py,sha256=-tzVHejaGDXyERaDrRqrKmbgwT13oJKxTivGwfUij7Y,10284
|
@@ -25,18 +25,19 @@ GameSentenceMiner/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
25
25
|
GameSentenceMiner/ocr/gsm_ocr_config.py,sha256=rQC6C8PKJXWoAvwCOYa363kodQQBwl1YNeYsD0bBbx4,1957
|
26
26
|
GameSentenceMiner/ocr/ocrconfig.py,sha256=_tY8mjnzHMJrLS8E5pHqYXZjMuLoGKYgJwdhYgN-ny4,6466
|
27
27
|
GameSentenceMiner/ocr/owocr_area_selector.py,sha256=sryQd7D33i7E6c8gO7dnxLWtL6Nghgs7cvppK-xFxiE,47076
|
28
|
-
GameSentenceMiner/ocr/owocr_helper.py,sha256=
|
28
|
+
GameSentenceMiner/ocr/owocr_helper.py,sha256=motXED_wX_CUljXp0pIaziw2xFBpz6gjokD2icDz02k,17358
|
29
29
|
GameSentenceMiner/owocr/owocr/__init__.py,sha256=opjBOyGGyEqZCE6YdZPnyt7nVfiwyELHsXA0jAsjm14,25
|
30
30
|
GameSentenceMiner/owocr/owocr/__main__.py,sha256=XQaqZY99EKoCpU-gWQjNbTs7Kg17HvBVE7JY8LqIE0o,157
|
31
|
-
GameSentenceMiner/owocr/owocr/config.py,sha256=
|
31
|
+
GameSentenceMiner/owocr/owocr/config.py,sha256=qM7kISHdUhuygGXOxmgU6Ef2nwBShrZtdqu4InDCViE,8103
|
32
32
|
GameSentenceMiner/owocr/owocr/lens_betterproto.py,sha256=oNoISsPilVVRBBPVDtb4-roJtAhp8ZAuFTci3TGXtMc,39141
|
33
|
-
GameSentenceMiner/owocr/owocr/ocr.py,sha256=
|
34
|
-
GameSentenceMiner/owocr/owocr/run.py,sha256=
|
35
|
-
GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py,sha256=
|
33
|
+
GameSentenceMiner/owocr/owocr/ocr.py,sha256=dPnDmtG-I24kcfxC3iudeRIVgGhLmiWMGyRiMANcYsA,41573
|
34
|
+
GameSentenceMiner/owocr/owocr/run.py,sha256=f59MhlV9JVpzFAq7aW-_0I3FGnzKyw0OLOAggWCiRvY,52083
|
35
|
+
GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py,sha256=Na6XStbQBtpQUSdbN3QhEswtKuU1JjReFk_K8t5ezQE,3395
|
36
36
|
GameSentenceMiner/vad/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
|
-
GameSentenceMiner/vad/
|
38
|
-
GameSentenceMiner/vad/
|
39
|
-
GameSentenceMiner/vad/
|
37
|
+
GameSentenceMiner/vad/result.py,sha256=C08HsYH4qVjTRh_dvrWrskmXHJ950w0GWxPjGx_BfGY,275
|
38
|
+
GameSentenceMiner/vad/silero_trim.py,sha256=c9T7td5kaSA0fokRHl84LiRXUtETyMULUw4UfSjZisA,1754
|
39
|
+
GameSentenceMiner/vad/vosk_helper.py,sha256=ZrR3WLX8PC4pl9ONzkkalUVyiDexjKrmf9hqsDG-ej0,6143
|
40
|
+
GameSentenceMiner/vad/whisper_helper.py,sha256=G164s1SE5k_W9bPXKsKTIAG68pzisgzTJ8ByvBmhSQg,3616
|
40
41
|
GameSentenceMiner/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
42
|
GameSentenceMiner/web/texthooking_page.py,sha256=AtVV9RS7HC3XnOq4X0FIMqJrzFoGlfSHFvS_CfhuzuA,13558
|
42
43
|
GameSentenceMiner/web/static/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -51,9 +52,9 @@ GameSentenceMiner/web/static/web-app-manifest-512x512.png,sha256=wyqgCWCrLEUxSRX
|
|
51
52
|
GameSentenceMiner/web/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
53
|
GameSentenceMiner/web/templates/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
|
53
54
|
GameSentenceMiner/web/templates/utility.html,sha256=NUp4Yjs6_j7YeqsM2rcF0LzwS6nXSBUWJDl-k2E8BbM,16270
|
54
|
-
gamesentenceminer-2.8.
|
55
|
-
gamesentenceminer-2.8.
|
56
|
-
gamesentenceminer-2.8.
|
57
|
-
gamesentenceminer-2.8.
|
58
|
-
gamesentenceminer-2.8.
|
59
|
-
gamesentenceminer-2.8.
|
55
|
+
gamesentenceminer-2.8.27.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
56
|
+
gamesentenceminer-2.8.27.dist-info/METADATA,sha256=YyFsH_0pIvAzqRYC0srO-cFN4xHyvT5GBdmfiSt3PBg,7165
|
57
|
+
gamesentenceminer-2.8.27.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
58
|
+
gamesentenceminer-2.8.27.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
59
|
+
gamesentenceminer-2.8.27.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
60
|
+
gamesentenceminer-2.8.27.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|