describealign 1.0.0__py3-none-any.whl → 1.0.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: describealign
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Combines videos with matching audio files (e.g. audio descriptions)
5
5
  Author-email: Julian Brown <julbean@proton.me>
6
6
  Project-URL: Homepage, https://github.com/julbean/describealign
@@ -18,7 +18,8 @@ Requires-Dist: numpy >=1.21.4
18
18
  Requires-Dist: python-speech-features >=0.6
19
19
  Requires-Dist: scipy >=1.10.1
20
20
  Requires-Dist: pytsmod >=0.3.7
21
- Requires-Dist: PySimpleGUIWx ==0.17.2
21
+ Requires-Dist: PySimpleGUIQt >=0.35.0 ; platform_system != "Windows"
22
+ Requires-Dist: PySimpleGUIWx ==0.17.2 ; platform_system == "Windows"
22
23
 
23
24
  For usage help, simply run the script directly.
24
25
  If the Scripts folder has been added to PATH, can be run
@@ -0,0 +1,7 @@
1
+ describealign.py,sha256=GLDxXbWfET4yn4aa32KUCGvHtIBlbltZm8RUSuajUiQ,64661
2
+ describealign-1.0.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
3
+ describealign-1.0.1.dist-info/METADATA,sha256=fxI3IaRakgXwFnkPR6GcMhHeIZ4F81pcOUnpTyD6puc,1195
4
+ describealign-1.0.1.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
5
+ describealign-1.0.1.dist-info/entry_points.txt,sha256=7o7N6v3r4vFIH_XBdgk7WWhr-vZ_YitY8JWMdzN5xU0,71
6
+ describealign-1.0.1.dist-info/top_level.txt,sha256=VYHWy4TeimBAF5BQAuDj4adGdLaWs2AoYx6qQjGPJ4M,14
7
+ describealign-1.0.1.dist-info/RECORD,,
describealign.py CHANGED
@@ -66,10 +66,16 @@ import scipy.interpolate
66
66
  import scipy.ndimage as nd
67
67
  import scipy.sparse
68
68
  import pytsmod
69
- import PySimpleGUIWx as sg
70
69
  import configparser
71
70
  import traceback
72
71
  import multiprocessing
72
+ import platform
73
+
74
+ IS_RUNNING_WINDOWS = platform.system() == 'Windows'
75
+ if IS_RUNNING_WINDOWS:
76
+ import PySimpleGUIWx as sg
77
+ else:
78
+ import PySimpleGUIQt as sg
73
79
 
74
80
  def display(text, func=None):
75
81
  if func:
@@ -976,12 +982,17 @@ def settings_gui(config_path):
976
982
  if event in (sg.WIN_CLOSED, 'Cancel') or settings_window.TKrootDestroyed:
977
983
  break
978
984
  if event == 'stretch_audio':
985
+ # work around bug in PySimpleGUIWx's InputText Update function where enabling/disabling are flipped
986
+ if IS_RUNNING_WINDOWS:
987
+ settings_window['boost'].Update(disabled = values['stretch_audio'])
988
+ settings_window['ad_detect_sensitivity'].Update(disabled = values['stretch_audio'])
989
+ settings_window['boost_sensitivity'].Update(disabled = values['stretch_audio'])
990
+ else:
991
+ settings_window['boost'].Update(disabled = not values['stretch_audio'])
992
+ settings_window['ad_detect_sensitivity'].Update(disabled = not values['stretch_audio'])
993
+ settings_window['boost_sensitivity'].Update(disabled = not values['stretch_audio'])
979
994
  settings_window['keep_non_ad'].Update(disabled = not values['stretch_audio'])
980
995
  settings_window['no_pitch_correction'].Update(disabled = not values['stretch_audio'])
981
- # work around bug in PySimpleGUIWx's InputText Update function where enabling/disabling are flipped
982
- settings_window['boost'].Update(disabled = values['stretch_audio'])
983
- settings_window['ad_detect_sensitivity'].Update(disabled = values['stretch_audio'])
984
- settings_window['boost_sensitivity'].Update(disabled = values['stretch_audio'])
985
996
  if event == 'Save':
986
997
  settings = values.copy()
987
998
  del settings['output_browse']
@@ -1017,9 +1028,11 @@ def combine_gui(video_files, audio_files, config_path):
1017
1028
  if not proc.is_alive():
1018
1029
  combine_window.DisableClose = False
1019
1030
  if not print_queue.empty():
1020
- cursor_position = output_textbox.WxTextCtrl.GetInsertionPoint()
1031
+ if IS_RUNNING_WINDOWS:
1032
+ cursor_position = output_textbox.WxTextCtrl.GetInsertionPoint()
1021
1033
  output_textbox.update('\n' + print_queue.get(), append=True)
1022
- output_textbox.WxTextCtrl.SetInsertionPoint(cursor_position)
1034
+ if IS_RUNNING_WINDOWS:
1035
+ output_textbox.WxTextCtrl.SetInsertionPoint(cursor_position)
1023
1036
  event, values = combine_window.read(timeout=100)
1024
1037
  # window closed event isn't always emitted, so also manually check window status
1025
1038
  if event == sg.WIN_CLOSED or combine_window.TKrootDestroyed:
@@ -1051,9 +1064,10 @@ def main_gui():
1051
1064
  audio_file_types = all_audio_file_types + audio_file_types
1052
1065
  video_and_audio_file_types = all_video_file_types + all_video_and_audio_file_types + video_and_audio_file_types
1053
1066
  # work around bug in PySimpleGUIWx's convert_tkinter_filetypes_to_wx function
1054
- file_fix = lambda file_types: file_types[:1] + [('|' + type[0], type[1]) for type in file_types[1:]]
1055
- audio_file_types = file_fix(audio_file_types)
1056
- video_and_audio_file_types = file_fix(video_and_audio_file_types)
1067
+ if IS_RUNNING_WINDOWS:
1068
+ file_fix = lambda file_types: file_types[:1] + [('|' + type[0], type[1]) for type in file_types[1:]]
1069
+ audio_file_types = file_fix(audio_file_types)
1070
+ video_and_audio_file_types = file_fix(video_and_audio_file_types)
1057
1071
 
1058
1072
  layout = [[sg.Text('Select media files to combine:', size=(40, 2), font=('Arial', 20), pad=(3,15))],
1059
1073
  [sg.Column([[sg.Text('Video Input:', size=(11, 2), pad=(1,5)),
@@ -1,7 +0,0 @@
1
- describealign.py,sha256=JfylK9WckTWd3LnQjpjK0GWMeA7zuZ1kzPjI3e6ZguA,64110
2
- describealign-1.0.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
3
- describealign-1.0.0.dist-info/METADATA,sha256=b_ta198nabMAFoC1Fir3XKwJG5aWnitYFUqBkhG5HVM,1094
4
- describealign-1.0.0.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
5
- describealign-1.0.0.dist-info/entry_points.txt,sha256=7o7N6v3r4vFIH_XBdgk7WWhr-vZ_YitY8JWMdzN5xU0,71
6
- describealign-1.0.0.dist-info/top_level.txt,sha256=VYHWy4TeimBAF5BQAuDj4adGdLaWs2AoYx6qQjGPJ4M,14
7
- describealign-1.0.0.dist-info/RECORD,,