GameSentenceMiner 2.10.17__py3-none-any.whl → 2.11.0__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/ai/ai_prompting.py +247 -44
- GameSentenceMiner/anki.py +8 -4
- GameSentenceMiner/config_gui.py +25 -17
- GameSentenceMiner/gsm.py +19 -17
- GameSentenceMiner/ocr/owocr_helper.py +9 -6
- GameSentenceMiner/owocr/owocr/ocr.py +42 -19
- GameSentenceMiner/owocr/owocr/run.py +11 -4
- GameSentenceMiner/util/configuration.py +11 -9
- GameSentenceMiner/util/text_log.py +4 -0
- GameSentenceMiner/vad.py +209 -174
- GameSentenceMiner/web/templates/index.html +21 -20
- GameSentenceMiner/web/texthooking_page.py +15 -1
- {gamesentenceminer-2.10.17.dist-info → gamesentenceminer-2.11.0.dist-info}/METADATA +1 -1
- {gamesentenceminer-2.10.17.dist-info → gamesentenceminer-2.11.0.dist-info}/RECORD +18 -18
- {gamesentenceminer-2.10.17.dist-info → gamesentenceminer-2.11.0.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.10.17.dist-info → gamesentenceminer-2.11.0.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.10.17.dist-info → gamesentenceminer-2.11.0.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.10.17.dist-info → gamesentenceminer-2.11.0.dist-info}/top_level.txt +0 -0
@@ -10,8 +10,10 @@ from dataclasses import dataclass
|
|
10
10
|
import flask
|
11
11
|
import websockets
|
12
12
|
|
13
|
+
from GameSentenceMiner.ai.ai_prompting import get_ai_prompt_result
|
14
|
+
from GameSentenceMiner.obs import get_current_game
|
13
15
|
from GameSentenceMiner.util.gsm_utils import TEXT_REPLACEMENTS_FILE
|
14
|
-
from GameSentenceMiner.util.text_log import GameLine, get_line_by_id, initial_time
|
16
|
+
from GameSentenceMiner.util.text_log import GameLine, get_line_by_id, initial_time, get_all_lines
|
15
17
|
from flask import request, jsonify, send_from_directory
|
16
18
|
import webbrowser
|
17
19
|
from GameSentenceMiner import obs
|
@@ -307,6 +309,18 @@ def play_audio():
|
|
307
309
|
obs.save_replay_buffer()
|
308
310
|
return jsonify({}), 200
|
309
311
|
|
312
|
+
@app.route("/translate-line", methods=['POST'])
|
313
|
+
def translate_line():
|
314
|
+
data = request.get_json()
|
315
|
+
event_id = data.get('id')
|
316
|
+
if event_id is None:
|
317
|
+
return jsonify({'error': 'Missing id'}), 400
|
318
|
+
line_to_translate = get_line_by_id(event_id)
|
319
|
+
translation = get_ai_prompt_result(get_all_lines(), line_to_translate.text,
|
320
|
+
line_to_translate, get_current_game())
|
321
|
+
line_to_translate.set_TL(translation)
|
322
|
+
return jsonify({'TL': translation}), 200
|
323
|
+
|
310
324
|
|
311
325
|
@app.route('/get_status', methods=['GET'])
|
312
326
|
def get_status():
|
@@ -1,12 +1,12 @@
|
|
1
1
|
GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
GameSentenceMiner/anki.py,sha256=
|
3
|
-
GameSentenceMiner/config_gui.py,sha256=
|
2
|
+
GameSentenceMiner/anki.py,sha256=3BVFXAM7tpJAxHMbsMpnMHUoDfyqHQ1JSYJThW18QWA,16846
|
3
|
+
GameSentenceMiner/config_gui.py,sha256=B0VjddeKcnc8w9nJMLK0I0XlGVOo-6KQRtISZ5K6j08,98511
|
4
4
|
GameSentenceMiner/gametext.py,sha256=6VkjmBeiuZfPk8T6PHFdIAElBH2Y_oLVYvmcafqN7RM,6747
|
5
|
-
GameSentenceMiner/gsm.py,sha256=
|
5
|
+
GameSentenceMiner/gsm.py,sha256=wTERcvG37SeDel51TCFusoQqk5B_b11YY4QZMTF0a6s,24954
|
6
6
|
GameSentenceMiner/obs.py,sha256=o_I6213VZvXqYkZDdUBgUg2KWi9SbnNZZjjUnKnQkK4,15190
|
7
|
-
GameSentenceMiner/vad.py,sha256=
|
7
|
+
GameSentenceMiner/vad.py,sha256=A3CvBQ67w3c7L8s7mTMxo6U_9ZQXlCToIpGUbePotfA,18321
|
8
8
|
GameSentenceMiner/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
|
-
GameSentenceMiner/ai/ai_prompting.py,sha256=
|
9
|
+
GameSentenceMiner/ai/ai_prompting.py,sha256=l8JKyL_4zO5x3QKExN4c3HUPF2mQfB4B-VKclO5ofmM,25348
|
10
10
|
GameSentenceMiner/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
GameSentenceMiner/assets/icon.png,sha256=9GRL8uXUAgkUSlvbm9Pv9o2poFVRGdW6s2ub_DeUD9M,937624
|
12
12
|
GameSentenceMiner/assets/icon128.png,sha256=l90j7biwdz5ahwOd5wZ-406ryEV9Pan93dquJQ3e1CI,18395
|
@@ -19,18 +19,18 @@ GameSentenceMiner/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
19
19
|
GameSentenceMiner/ocr/gsm_ocr_config.py,sha256=jtTzAWtMAx8GuA1XIJ_BmyNn3aYaO3u_c5Q7m5D4gS8,4056
|
20
20
|
GameSentenceMiner/ocr/ocrconfig.py,sha256=_tY8mjnzHMJrLS8E5pHqYXZjMuLoGKYgJwdhYgN-ny4,6466
|
21
21
|
GameSentenceMiner/ocr/owocr_area_selector.py,sha256=lHMVZuEE_-_wICfDr6jDJNSJIyZd2PnF7dIajknaHCU,20255
|
22
|
-
GameSentenceMiner/ocr/owocr_helper.py,sha256=
|
22
|
+
GameSentenceMiner/ocr/owocr_helper.py,sha256=OV31PCPGwLUYq3HBFdS6UoFB2hAyJE8yHm1UoDYoY38,22431
|
23
23
|
GameSentenceMiner/ocr/ss_picker.py,sha256=0IhxUdaKruFpZyBL-8SpxWg7bPrlGpy3lhTcMMZ5rwo,5224
|
24
24
|
GameSentenceMiner/owocr/owocr/__init__.py,sha256=87hfN5u_PbL_onLfMACbc0F5j4KyIK9lKnRCj6oZgR0,49
|
25
25
|
GameSentenceMiner/owocr/owocr/__main__.py,sha256=XQaqZY99EKoCpU-gWQjNbTs7Kg17HvBVE7JY8LqIE0o,157
|
26
26
|
GameSentenceMiner/owocr/owocr/config.py,sha256=qM7kISHdUhuygGXOxmgU6Ef2nwBShrZtdqu4InDCViE,8103
|
27
27
|
GameSentenceMiner/owocr/owocr/lens_betterproto.py,sha256=oNoISsPilVVRBBPVDtb4-roJtAhp8ZAuFTci3TGXtMc,39141
|
28
|
-
GameSentenceMiner/owocr/owocr/ocr.py,sha256=
|
29
|
-
GameSentenceMiner/owocr/owocr/run.py,sha256=
|
28
|
+
GameSentenceMiner/owocr/owocr/ocr.py,sha256=iooUMZ5Z7ub2PMxuK9314U3DyuafZ6ASt-acrRe7rsk,59446
|
29
|
+
GameSentenceMiner/owocr/owocr/run.py,sha256=lwZOj5nmQWgXlQOA_b2FYrMjhGWCPA7ZZCBg-cj57-k,56518
|
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=VXed6OKZPjwo1sK9CbpCerEsB3Dro82sEpFiQrWh97w,28961
|
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=iRyLVcodMptRhkCzLf3hyqc6_RCktXnwApi6mLju6oQ,11565
|
@@ -38,7 +38,7 @@ GameSentenceMiner/util/model.py,sha256=AaOzgqSbaN7yks_rr1dQpLQR45FpBYdoLebMbrIYm
|
|
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
|
41
|
-
GameSentenceMiner/util/text_log.py,sha256=
|
41
|
+
GameSentenceMiner/util/text_log.py,sha256=_zGqpbsUIdBVYZofK0XuBbU_tZnz0xmw_xfkJAZbctA,5907
|
42
42
|
GameSentenceMiner/util/communication/__init__.py,sha256=xh__yn2MhzXi9eLi89PeZWlJPn-cbBSjskhi1BRraXg,643
|
43
43
|
GameSentenceMiner/util/communication/send.py,sha256=Wki9qIY2CgYnuHbmnyKVIYkcKAN_oYS4up93XMikBaI,222
|
44
44
|
GameSentenceMiner/util/communication/websocket.py,sha256=TbphRGmxVrgEupS7tNdifsmQfWDfIp0Hio2cSiUKgsk,3317
|
@@ -48,7 +48,7 @@ GameSentenceMiner/util/downloader/download_tools.py,sha256=zR-aEHiFVkyo-9oPoSx6n
|
|
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=S7bYf2kSk08u-8R9Qpv7piM-pxfFjYZUvU825xupmuI,5279
|
51
|
-
GameSentenceMiner/web/texthooking_page.py,sha256=
|
51
|
+
GameSentenceMiner/web/texthooking_page.py,sha256=8wuhYs2LC0JwCavg0wHcCEMyeYyVKtQrRzFUMYL4H2o,16819
|
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
|
@@ -59,12 +59,12 @@ GameSentenceMiner/web/static/style.css,sha256=bPZK0NVMuyRl5NNDuT7ZTzVLKlvSsdmeVH
|
|
59
59
|
GameSentenceMiner/web/static/web-app-manifest-192x192.png,sha256=EfSNnBmsSaLfESbkGfYwbKzcjKOdzuWo18ABADfN974,51117
|
60
60
|
GameSentenceMiner/web/static/web-app-manifest-512x512.png,sha256=wyqgCWCrLEUxSRXmaA3iJEESd-vM-ZmlTtZFBY4V8Pk,230819
|
61
61
|
GameSentenceMiner/web/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
62
|
-
GameSentenceMiner/web/templates/index.html,sha256=
|
62
|
+
GameSentenceMiner/web/templates/index.html,sha256=Gv3CJvNnhAzIVV_QxhNq4OD-pXDt1vKCu9k6WdHSXuA,215343
|
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.
|
66
|
-
gamesentenceminer-2.
|
67
|
-
gamesentenceminer-2.
|
68
|
-
gamesentenceminer-2.
|
69
|
-
gamesentenceminer-2.
|
70
|
-
gamesentenceminer-2.
|
65
|
+
gamesentenceminer-2.11.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
66
|
+
gamesentenceminer-2.11.0.dist-info/METADATA,sha256=seST1470YoAwPQ6PAyizVoUWviEWbOCqCro6JaSrsfc,7347
|
67
|
+
gamesentenceminer-2.11.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
68
|
+
gamesentenceminer-2.11.0.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
69
|
+
gamesentenceminer-2.11.0.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
70
|
+
gamesentenceminer-2.11.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|