GameSentenceMiner 2.10.6__py3-none-any.whl → 2.10.8__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/config_gui.py +10 -0
- GameSentenceMiner/gsm.py +3 -2
- GameSentenceMiner/util/configuration.py +6 -0
- GameSentenceMiner/util/model.py +1 -1
- GameSentenceMiner/web/texthooking_page.py +5 -3
- {gamesentenceminer-2.10.6.dist-info → gamesentenceminer-2.10.8.dist-info}/METADATA +1 -1
- {gamesentenceminer-2.10.6.dist-info → gamesentenceminer-2.10.8.dist-info}/RECORD +11 -11
- {gamesentenceminer-2.10.6.dist-info → gamesentenceminer-2.10.8.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.10.6.dist-info → gamesentenceminer-2.10.8.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.10.6.dist-info → gamesentenceminer-2.10.8.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.10.6.dist-info → gamesentenceminer-2.10.8.dist-info}/top_level.txt +0 -0
GameSentenceMiner/config_gui.py
CHANGED
@@ -274,6 +274,7 @@ class ConfigApp:
|
|
274
274
|
# use_anki_note_creation_time=self.use_anki_note_creation_time.get(),
|
275
275
|
ocr_websocket_port=int(self.ocr_websocket_port.get()),
|
276
276
|
texthooker_communication_websocket_port=int(self.texthooker_communication_websocket_port.get()),
|
277
|
+
plaintext_websocket_port=int(self.plaintext_websocket_export_port.get()),
|
277
278
|
),
|
278
279
|
ai=Ai(
|
279
280
|
enabled=self.ai_enabled.get(),
|
@@ -1329,6 +1330,15 @@ class ConfigApp:
|
|
1329
1330
|
self.texthooker_communication_websocket_port.grid(row=self.current_row, column=1, sticky='EW', pady=2)
|
1330
1331
|
self.current_row += 1
|
1331
1332
|
|
1333
|
+
HoverInfoLabelWidget(advanced_frame, text="Plaintext Websocket Export Port:",
|
1334
|
+
tooltip="Port for GSM Plaintext WebSocket Export communication. Does nothing right now, hardcoded to 55002",
|
1335
|
+
row=self.current_row, column=0)
|
1336
|
+
self.plaintext_websocket_export_port = ttk.Entry(advanced_frame)
|
1337
|
+
self.plaintext_websocket_export_port.insert(0, str(self.settings.advanced.plaintext_websocket_port))
|
1338
|
+
self.plaintext_websocket_export_port.grid(row=self.current_row, column=1, sticky='EW', pady=2)
|
1339
|
+
self.current_row += 1
|
1340
|
+
|
1341
|
+
|
1332
1342
|
# HoverInfoLabelWidget(advanced_frame, text="Use Anki Creation Date for Audio Timing:",
|
1333
1343
|
# tooltip="Use the Anki note creation date for audio timing instead of the OBS replay time.",
|
1334
1344
|
# row=self.current_row, column=0)
|
GameSentenceMiner/gsm.py
CHANGED
@@ -198,8 +198,9 @@ class VideoToAudioHandler(FileSystemEventHandler):
|
|
198
198
|
vad_result = vad_processor.trim_audio_with_vad(trimmed_audio, vad_trimmed_audio, game_line)
|
199
199
|
if timing_only:
|
200
200
|
return vad_result
|
201
|
-
|
202
|
-
|
201
|
+
if vad_result.output_audio:
|
202
|
+
vad_trimmed_audio = vad_result.output_audio
|
203
|
+
if vadget_config().audio.ffmpeg_reencode_options_to_use and os.path.exists(vad_trimmed_audio):
|
203
204
|
ffmpeg.reencode_file_with_user_config(vad_trimmed_audio, final_audio_output,
|
204
205
|
get_config().audio.ffmpeg_reencode_options_to_use)
|
205
206
|
elif os.path.exists(vad_trimmed_audio):
|
@@ -243,6 +243,7 @@ class VAD:
|
|
243
243
|
@dataclass_json
|
244
244
|
@dataclass
|
245
245
|
class Advanced:
|
246
|
+
plaintext_websocket_port: int = -1
|
246
247
|
audio_player_path: str = ''
|
247
248
|
video_player_path: str = ''
|
248
249
|
show_screenshot_buttons: bool = False
|
@@ -252,6 +253,11 @@ class Advanced:
|
|
252
253
|
texthooker_communication_websocket_port: int = 55001
|
253
254
|
use_anki_note_creation_time: bool = True
|
254
255
|
|
256
|
+
def __post_init__(self):
|
257
|
+
if self.plaintext_websocket_port == -1:
|
258
|
+
self.plaintext_websocket_port = self.texthooker_communication_websocket_port + 1
|
259
|
+
|
260
|
+
|
255
261
|
@dataclass_json
|
256
262
|
@dataclass
|
257
263
|
class Ai:
|
GameSentenceMiner/util/model.py
CHANGED
@@ -184,7 +184,7 @@ class VADResult:
|
|
184
184
|
self.end = end
|
185
185
|
self.model = model
|
186
186
|
self.segments = segments if segments is not None else []
|
187
|
-
self.output_audio =
|
187
|
+
self.output_audio = output_audio
|
188
188
|
|
189
189
|
def __repr__(self):
|
190
190
|
return f"VADResult(success={self.success}, start={self.start}, end={self.end}, model={self.model}, output_audio={self.output_audio})"
|
@@ -264,7 +264,8 @@ async def add_event_to_texthooker(line: GameLine):
|
|
264
264
|
'sentence': line.text,
|
265
265
|
'data': new_event.to_serializable()
|
266
266
|
})
|
267
|
-
|
267
|
+
if get_config().advanced.plaintext_websocket_port:
|
268
|
+
await plaintext_websocket_server_thread.send_text(line.text)
|
268
269
|
|
269
270
|
|
270
271
|
@app.route('/update_checkbox', methods=['POST'])
|
@@ -465,8 +466,9 @@ async def texthooker_page_coro():
|
|
465
466
|
websocket_server_thread = WebsocketServerThread(read=True, ws_port=get_config().advanced.texthooker_communication_websocket_port)
|
466
467
|
websocket_server_thread.start()
|
467
468
|
|
468
|
-
|
469
|
-
|
469
|
+
if get_config().advanced.plaintext_websocket_port:
|
470
|
+
plaintext_websocket_server_thread = WebsocketServerThread(read=False, ws_port=get_config().advanced.plaintext_websocket_port)
|
471
|
+
plaintext_websocket_server_thread.start()
|
470
472
|
|
471
473
|
# Keep the main asyncio event loop running (for the WebSocket server)
|
472
474
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
GameSentenceMiner/anki.py,sha256=kWw3PV_Jj5-lHcttCB3lRXejHlaAbiJ2Ag_NAGX-RI8,16632
|
3
|
-
GameSentenceMiner/config_gui.py,sha256=
|
3
|
+
GameSentenceMiner/config_gui.py,sha256=h-vDxpFCC347iK_mDJAjwKm7Qubeu-NWaxvd9SvzqzY,90942
|
4
4
|
GameSentenceMiner/gametext.py,sha256=6VkjmBeiuZfPk8T6PHFdIAElBH2Y_oLVYvmcafqN7RM,6747
|
5
|
-
GameSentenceMiner/gsm.py,sha256=
|
5
|
+
GameSentenceMiner/gsm.py,sha256=BE4PGowAtC9vJlvO5DUypazJuKQmKwoIvAstWySS71w,24628
|
6
6
|
GameSentenceMiner/obs.py,sha256=ZV9Vk39hrsJLT-AlIxa3qgncKxXaL3Myl33vVJEDEoA,14670
|
7
7
|
GameSentenceMiner/vad.py,sha256=G0NkaWFJaIfKQAV7LOFxyKoih7pPNYHDuy4SzeFVCkI,16389
|
8
8
|
GameSentenceMiner/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -30,11 +30,11 @@ GameSentenceMiner/owocr/owocr/run.py,sha256=mZIGDm3fGYrYbSNuFOk7Sbslfgi36YN0YqfC
|
|
30
30
|
GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py,sha256=Na6XStbQBtpQUSdbN3QhEswtKuU1JjReFk_K8t5ezQE,3395
|
31
31
|
GameSentenceMiner/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
32
|
GameSentenceMiner/util/audio_offset_selector.py,sha256=8Stk3BP-XVIuzRv9nl9Eqd2D-1yD3JrgU-CamBywJmY,8542
|
33
|
-
GameSentenceMiner/util/configuration.py,sha256=
|
33
|
+
GameSentenceMiner/util/configuration.py,sha256=iXgfrawPPpAmQdXv2zPR-LuZnXx1ORGAwwP55OmLOs8,28778
|
34
34
|
GameSentenceMiner/util/electron_config.py,sha256=3VmIrcXhC-wIMMc4uqV85NrNenRl4ZUbnQfSjWEwuig,9852
|
35
35
|
GameSentenceMiner/util/ffmpeg.py,sha256=t0tflxq170n8PZKkdw8fTZIUQfXD0p_qARa9JTdhBTc,21530
|
36
36
|
GameSentenceMiner/util/gsm_utils.py,sha256=_279Fu9CU6FEh4cP6h40TWOt_BrqmPgytfumi8y53Ew,11491
|
37
|
-
GameSentenceMiner/util/model.py,sha256=
|
37
|
+
GameSentenceMiner/util/model.py,sha256=AaOzgqSbaN7yks_rr1dQpLQR45FpBYdoLebMbrIYm34,6638
|
38
38
|
GameSentenceMiner/util/notification.py,sha256=0OnEYjn3DUEZ6c6OtPjdVZe-DG-QSoMAl9fetjjCvNU,3874
|
39
39
|
GameSentenceMiner/util/package.py,sha256=u1ym5z869lw5EHvIviC9h9uH97bzUXSXXA8KIn8rUvk,1157
|
40
40
|
GameSentenceMiner/util/ss_selector.py,sha256=cbjMxiKOCuOfbRvLR_PCRlykBrGtm1LXd6u5czPqkmc,4793
|
@@ -48,7 +48,7 @@ GameSentenceMiner/util/downloader/download_tools.py,sha256=mvnOjDHFlV1AbjHaNI7md
|
|
48
48
|
GameSentenceMiner/util/downloader/oneocr_dl.py,sha256=EJbKISaZ9p2x9P4x0rpMM5nAInTTc9b7arraGBcd-SA,10381
|
49
49
|
GameSentenceMiner/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
50
50
|
GameSentenceMiner/web/service.py,sha256=2o62dZfDSBxBH5zCjrcHCX5yAc3PmGeP2lr07n8-dgo,5779
|
51
|
-
GameSentenceMiner/web/texthooking_page.py,sha256=
|
51
|
+
GameSentenceMiner/web/texthooking_page.py,sha256=rX2rBFIlVlKmVXB8dseuyWfMzcDcjNNQosncwUolMu8,16054
|
52
52
|
GameSentenceMiner/web/static/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
53
|
GameSentenceMiner/web/static/apple-touch-icon.png,sha256=OcMI8af_68DA_tweOsQ5LytTyMwm7-hPW07IfrOVgEs,46132
|
54
54
|
GameSentenceMiner/web/static/favicon-96x96.png,sha256=lOePzjiKl1JY2J1kT_PMdyEnrlJmi5GWbmXJunM12B4,16502
|
@@ -62,9 +62,9 @@ GameSentenceMiner/web/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
|
|
62
62
|
GameSentenceMiner/web/templates/index.html,sha256=n0J-dV8eksj8JXUuaCTIh0fIxIjfgm2EvxGBdQ6gWoM,214113
|
63
63
|
GameSentenceMiner/web/templates/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
|
64
64
|
GameSentenceMiner/web/templates/utility.html,sha256=3flZinKNqUJ7pvrZk6xu__v67z44rXnaK7UTZ303R-8,16946
|
65
|
-
gamesentenceminer-2.10.
|
66
|
-
gamesentenceminer-2.10.
|
67
|
-
gamesentenceminer-2.10.
|
68
|
-
gamesentenceminer-2.10.
|
69
|
-
gamesentenceminer-2.10.
|
70
|
-
gamesentenceminer-2.10.
|
65
|
+
gamesentenceminer-2.10.8.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
66
|
+
gamesentenceminer-2.10.8.dist-info/METADATA,sha256=RbguN5KP3KaCpmklj4Yz5rg6WIGzHMMnDkp8mQBd1BI,7354
|
67
|
+
gamesentenceminer-2.10.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
68
|
+
gamesentenceminer-2.10.8.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
69
|
+
gamesentenceminer-2.10.8.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
70
|
+
gamesentenceminer-2.10.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|