GameSentenceMiner 2.12.6.dev0__py3-none-any.whl → 2.12.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.
@@ -197,7 +197,7 @@ last_ocr2_result = []
197
197
  last_sent_result = ""
198
198
 
199
199
  def do_second_ocr(ocr1_text, time, img, filtering, pre_crop_image=None, ignore_furigana_filter=False, ignore_previous_result=False):
200
- global twopassocr, ocr2, last_ocr2_result
200
+ global twopassocr, ocr2, last_ocr2_result, last_sent_result
201
201
  try:
202
202
  orig_text, text = run.process_and_write_results(img, None, last_ocr2_result if not ignore_previous_result else None, filtering, None,
203
203
  engine=get_ocr_ocr2(), furigana_filter_sensitivity=furigana_filter_sensitivity if not ignore_furigana_filter else 0)
@@ -293,7 +293,7 @@ def reset_callback_vars():
293
293
  run.set_last_image(None)
294
294
 
295
295
  def text_callback(text, orig_text, time, img=None, came_from_ss=False, filtering=None, crop_coords=None):
296
- global twopassocr, ocr2, previous_text, last_oneocr_time, text_stable_start_time, previous_orig_text, previous_img, force_stable, previous_ocr1_result, previous_text_list
296
+ global twopassocr, ocr2, previous_text, last_oneocr_time, text_stable_start_time, previous_orig_text, previous_img, force_stable, previous_ocr1_result, previous_text_list, last_sent_result
297
297
  orig_text_string = ''.join([item for item in orig_text if item is not None]) if orig_text else ""
298
298
  if came_from_ss:
299
299
  save_result_image(img)
@@ -900,7 +900,7 @@ class OBSScreenshotThread(threading.Thread):
900
900
  logger.error("No active source found in the current scene.")
901
901
  time.sleep(1)
902
902
  continue
903
- img = obs.get_screenshot_PIL(source_name=self.current_source_name, width=self.width, height=self.height, img_format='jpg', compression=90)
903
+ img = obs.get_screenshot_PIL(source_name=self.current_source_name, width=self.width, height=self.height, img_format='png', compression=80)
904
904
 
905
905
  if img is not None:
906
906
  if not img.getbbox():
@@ -9,13 +9,14 @@ from typing import Dict, Any, List, Tuple
9
9
  from GameSentenceMiner.util.electron_config import get_ocr_language
10
10
 
11
11
  if get_config().wip.overlay_websocket_send:
12
- from GameSentenceMiner.owocr.owocr.ocr import GoogleLens, OneOCR, get_regex
12
+ try:
13
+ from GameSentenceMiner.owocr.owocr.ocr import GoogleLens, OneOCR, get_regex
14
+ oneocr = OneOCR()
15
+ lens = GoogleLens()
16
+ except ImportError:
17
+ pass
13
18
  from GameSentenceMiner.obs import *
14
19
 
15
- if get_config().wip.overlay_websocket_send:
16
- oneocr = OneOCR()
17
- lens = GoogleLens()
18
-
19
20
 
20
21
  def _convert_box_to_pixels_v2(
21
22
  bbox_data: Dict[str, float],
@@ -314,7 +315,7 @@ async def get_full_screenshot() -> Image.Image | None:
314
315
  else:
315
316
  monitors = [monitors[0]]
316
317
  monitor = monitors[get_config().wip.monitor_to_capture]
317
- img = get_screenshot_PIL(compression=100, img_format='jpg')
318
+ img = get_screenshot_PIL(compression=90, img_format='jpg')
318
319
  # Put the image over a transparent background without stretching
319
320
  new_img = Image.new("RGBA", (monitor['width'], monitor['height']), (0, 0, 0, 0))
320
321
  # Calculate coordinates to center img horizontally and vertically
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GameSentenceMiner
3
- Version: 2.12.6.dev0
3
+ Version: 2.12.7
4
4
  Summary: A tool for mining sentences from games. Update: Overlay?
5
5
  Author-email: Beangate <bpwhelan95@gmail.com>
6
6
  License: MIT License
@@ -19,14 +19,14 @@ GameSentenceMiner/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
19
19
  GameSentenceMiner/ocr/gsm_ocr_config.py,sha256=Ezj-0k6Wo-una91FvYhMp6KGkRhWYihXzLAoh_Wu2xY,5329
20
20
  GameSentenceMiner/ocr/ocrconfig.py,sha256=_tY8mjnzHMJrLS8E5pHqYXZjMuLoGKYgJwdhYgN-ny4,6466
21
21
  GameSentenceMiner/ocr/owocr_area_selector.py,sha256=O8qKOTDglk-D4N-2_ORLeZacXT-OVOCNxUI8sQHAlx4,25538
22
- GameSentenceMiner/ocr/owocr_helper.py,sha256=Dd5WtgyQUfQAnflPLo6C6XxzMKKEVNgziy5QCgwpwWw,25391
22
+ GameSentenceMiner/ocr/owocr_helper.py,sha256=To_tIGPgj68QkEGasQuh5vK6Zg-BLqJmkVHusp-q4Bs,25427
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
28
  GameSentenceMiner/owocr/owocr/ocr.py,sha256=Zii5r15ZlHFJWSbmXpva6QJVGkU3j2wT5Q0izazLyCQ,63021
29
- GameSentenceMiner/owocr/owocr/run.py,sha256=oAH6K_LEyGffJgaAKcvjDxCY3x3SfbsKfXqRiU2MNF8,65962
29
+ GameSentenceMiner/owocr/owocr/run.py,sha256=BvUmJAb1YboDn3FNS6jP92i3gmYjTE_uGJi-_qG_LdY,65962
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
@@ -63,10 +63,10 @@ GameSentenceMiner/web/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
63
63
  GameSentenceMiner/web/templates/index.html,sha256=Gv3CJvNnhAzIVV_QxhNq4OD-pXDt1vKCu9k6WdHSXuA,215343
64
64
  GameSentenceMiner/web/templates/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
65
65
  GameSentenceMiner/web/templates/utility.html,sha256=3flZinKNqUJ7pvrZk6xu__v67z44rXnaK7UTZ303R-8,16946
66
- GameSentenceMiner/wip/get_overlay_coords.py,sha256=yivn8C26BBRK4cjE7yPv1XfvbyqWC0itLL9Vay8aY-c,19780
67
- gamesentenceminer-2.12.6.dev0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
68
- gamesentenceminer-2.12.6.dev0.dist-info/METADATA,sha256=U_kd54nTtK8b38F9eo8JsOhn3_2fIbIFOQzjZSVHOPg,7066
69
- gamesentenceminer-2.12.6.dev0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
70
- gamesentenceminer-2.12.6.dev0.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
71
- gamesentenceminer-2.12.6.dev0.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
72
- gamesentenceminer-2.12.6.dev0.dist-info/RECORD,,
66
+ GameSentenceMiner/wip/get_overlay_coords.py,sha256=_re9zfyuFryZAUKbMQ1LAfQBDIRUmq_1kniisN7J7xE,19793
67
+ gamesentenceminer-2.12.7.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
68
+ gamesentenceminer-2.12.7.dist-info/METADATA,sha256=-HtGoHEU85F1LXqVKIvnGn7SeYjaB2Ak8TsHnu3fPPw,7061
69
+ gamesentenceminer-2.12.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
70
+ gamesentenceminer-2.12.7.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
71
+ gamesentenceminer-2.12.7.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
72
+ gamesentenceminer-2.12.7.dist-info/RECORD,,