GameSentenceMiner 2.13.4.post2__tar.gz → 2.13.5.post1__tar.gz
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-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/gsm.py +27 -1
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/vad.py +11 -3
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner.egg-info/PKG-INFO +1 -1
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/PKG-INFO +1 -1
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/pyproject.toml +1 -1
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/__init__.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/ai/__init__.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/ai/ai_prompting.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/anki.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/assets/__init__.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/assets/icon.png +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/assets/icon128.png +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/assets/icon256.png +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/assets/icon32.png +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/assets/icon512.png +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/assets/icon64.png +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/assets/pickaxe.png +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/config_gui.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/gametext.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/locales/en_us.json +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/locales/ja_jp.json +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/locales/zh_cn.json +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/obs.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/ocr/__init__.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/ocr/gsm_ocr_config.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/ocr/ocrconfig.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/ocr/owocr_area_selector.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/ocr/owocr_helper.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/ocr/ss_picker.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/owocr/owocr/__init__.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/owocr/owocr/__main__.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/owocr/owocr/config.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/owocr/owocr/lens_betterproto.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/owocr/owocr/ocr.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/owocr/owocr/run.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/__init__.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/audio_offset_selector.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/communication/__init__.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/communication/send.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/communication/websocket.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/configuration.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/downloader/Untitled_json.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/downloader/__init__.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/downloader/download_tools.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/downloader/oneocr_dl.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/electron_config.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/ffmpeg.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/gsm_utils.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/model.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/notification.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/package.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/ss_selector.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/text_log.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/window_transparency.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/__init__.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/service.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/static/__init__.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/static/apple-touch-icon.png +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/static/favicon-96x96.png +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/static/favicon.ico +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/static/favicon.svg +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/static/site.webmanifest +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/static/style.css +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/static/web-app-manifest-192x192.png +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/static/web-app-manifest-512x512.png +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/templates/__init__.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/templates/index.html +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/templates/text_replacements.html +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/templates/utility.html +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/texthooking_page.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/wip/get_overlay_coords.py +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner.egg-info/SOURCES.txt +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner.egg-info/dependency_links.txt +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner.egg-info/entry_points.txt +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner.egg-info/requires.txt +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner.egg-info/top_level.txt +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/LICENSE +0 -0
- {gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/setup.cfg +0 -0
@@ -175,7 +175,7 @@ class VideoToAudioHandler(FileSystemEventHandler):
|
|
175
175
|
anki.update_anki_card(
|
176
176
|
last_note, note, audio_path=final_audio_output, video_path=video_path,
|
177
177
|
tango=tango,
|
178
|
-
should_update_audio=vad_result.
|
178
|
+
should_update_audio=vad_result.output_audio,
|
179
179
|
ss_time=ss_timing,
|
180
180
|
game_line=mined_line,
|
181
181
|
selected_lines=selected_lines
|
@@ -618,6 +618,29 @@ async def run_test_code():
|
|
618
618
|
if boxes:
|
619
619
|
await texthooking_page.send_word_coordinates_to_overlay(boxes)
|
620
620
|
await asyncio.sleep(2)
|
621
|
+
|
622
|
+
|
623
|
+
async def check_if_script_is_running():
|
624
|
+
"""Check if the script is already running and kill it if so."""
|
625
|
+
if os.path.exists(os.path.join(get_app_directory(), "current_pid.txt")):
|
626
|
+
with open(os.path.join(get_app_directory(), "current_pid.txt"), "r") as f:
|
627
|
+
pid = int(f.read().strip())
|
628
|
+
if psutil.pid_exists(pid) and 'python' in psutil.Process(pid).name().lower():
|
629
|
+
logger.info(f"Script is already running with PID: {pid}")
|
630
|
+
psutil.Process(pid).terminate() # Attempt to terminate the existing process
|
631
|
+
logger.info("Sent SIGTERM to the existing process.")
|
632
|
+
notification.send_error_notification(
|
633
|
+
"Script was already running. Terminating the existing process.")
|
634
|
+
return True
|
635
|
+
return False
|
636
|
+
|
637
|
+
|
638
|
+
async def log_current_pid():
|
639
|
+
"""Log the current process ID."""
|
640
|
+
current_pid = os.getpid()
|
641
|
+
logger.info(f"Current process ID: {current_pid}")
|
642
|
+
with open(os.path.join(get_app_directory(), "current_pid.txt"), "w") as f:
|
643
|
+
f.write(str(current_pid))
|
621
644
|
|
622
645
|
|
623
646
|
async def async_main(reloading=False):
|
@@ -638,6 +661,9 @@ async def async_main(reloading=False):
|
|
638
661
|
run_new_thread(post_init2)
|
639
662
|
run_new_thread(run_text_hooker_page)
|
640
663
|
run_new_thread(async_loop)
|
664
|
+
|
665
|
+
# await check_if_script_is_running()
|
666
|
+
# await log_current_pid()
|
641
667
|
|
642
668
|
# Register signal handlers for graceful shutdown
|
643
669
|
signal.signal(signal.SIGTERM, handle_exit()) # Handle `kill` commands
|
@@ -376,8 +376,8 @@ vad_processor = VADSystem()
|
|
376
376
|
# Test cases for all VADProcessors
|
377
377
|
def test_vad_processors():
|
378
378
|
logger.setLevel(logging.DEBUG)
|
379
|
-
test_audio = r"C:\Users\Beangate\GSM\
|
380
|
-
output_dir = r"C:\Users\Beangate\GSM\
|
379
|
+
test_audio = r"C:\Users\Beangate\GSM\GameSentenceMiner\GameSentenceMiner\test\tmpso7v0265.opus"
|
380
|
+
output_dir = r"C:\Users\Beangate\GSM\GameSentenceMiner\GameSentenceMiner\test\output"
|
381
381
|
os.makedirs(output_dir, exist_ok=True)
|
382
382
|
processors = [
|
383
383
|
(WhisperVADProcessor(), "after_splice_whisper.opus"),
|
@@ -396,12 +396,20 @@ def test_vad_processors():
|
|
396
396
|
|
397
397
|
get_config().vad.cut_and_splice_segments = False
|
398
398
|
get_config().vad.trim_beginning = True
|
399
|
+
get_config().vad.add_audio_on_no_results = True
|
399
400
|
for processor, out_name in processors:
|
400
401
|
logger.info("Testing Trim Audio with " + processor.vad_system_name)
|
401
402
|
out_path = os.path.join(output_dir, out_name.replace("after_splice_", "after_trim_"))
|
402
403
|
if os.path.exists(out_path):
|
403
404
|
os.remove(out_path)
|
404
|
-
processor.process_audio(test_audio, out_path, None)
|
405
|
+
result = processor.process_audio(test_audio, out_path, None)
|
406
|
+
print(result)
|
407
|
+
|
408
|
+
vad_system = VADSystem()
|
409
|
+
vad_system.init()
|
410
|
+
|
411
|
+
result = vad_system.trim_audio_with_vad(test_audio, os.path.join(output_dir, "after_vad.opus"), None)
|
412
|
+
print(result)
|
405
413
|
|
406
414
|
|
407
415
|
if __name__ == "__main__":
|
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
|
|
7
7
|
|
8
8
|
[project]
|
9
9
|
name = "GameSentenceMiner"
|
10
|
-
version = "2.13.
|
10
|
+
version = "2.13.5post1"
|
11
11
|
description = "A tool for mining sentences from games. Update: Overlay?"
|
12
12
|
readme = "README.md"
|
13
13
|
requires-python = ">=3.10"
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/__init__.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/ai/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/assets/icon.png
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/config_gui.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/gametext.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/ocr/__init__.py
RENAMED
File without changes
|
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/ocr/ocrconfig.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/ocr/ss_picker.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/ffmpeg.py
RENAMED
File without changes
|
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/model.py
RENAMED
File without changes
|
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/package.py
RENAMED
File without changes
|
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/util/text_log.py
RENAMED
File without changes
|
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/__init__.py
RENAMED
File without changes
|
{gamesentenceminer-2.13.4.post2 → gamesentenceminer-2.13.5.post1}/GameSentenceMiner/web/service.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|