Skip to content

Instantly share code, notes, and snippets.

@KumaTea
Created March 30, 2023 05:38
Show Gist options
  • Select an option

  • Save KumaTea/17619675425959023ea26ef4510bfdef to your computer and use it in GitHub Desktop.

Select an option

Save KumaTea/17619675425959023ea26ef4510bfdef to your computer and use it in GitHub Desktop.
Adobe Premiere Pro 2022/2023 Speech-to-text Modules Slimmer
# Please place this script in the installation folder
import os
import json
import shutil
modules_path = os.path.join('products', 'PPRO')
app_json_path = os.path.join(modules_path, 'application.json')
if __name__ == '__main__':
try:
assert os.path.isfile('Set-up.exe')
except AssertionError:
exit(
'Please place this script in the installation folder '
'where "Set-up.exe" exists.'
)
modules_path_files = os.listdir(modules_path)
to_delete = [i for i in modules_path_files if i.startswith('AdobePremierePro23AllTrial-')]
if to_delete:
print('Speech to text files:')
for i in to_delete:
print(' ', i)
confirm_del = input('PERMANENTLY delete? ([Y]/n)') or 'Y'
if confirm_del.upper() == 'Y':
for i in to_delete:
os.remove(os.path.join(modules_path_files, i))
shutil.copyfile(app_json_path, os.path.join(modules_path, 'application.json.bak'))
with open(app_json_path, 'r', encoding='utf-8') as f:
app_json = json.load(f)
new_pkgs = []
for pkg in app_json['Packages']['Package']:
if pkg['Type'] == 'core':
new_pkgs.append(pkg)
assert new_pkgs
app_json['Packages']['Package'] = new_pkgs.copy()
new_mods = []
for mod in app_json['Modules']['Module']:
if 'esl' not in mod['Id']:
new_mods.append(pkg)
app_json['Modules']['Module'] = new_mods.copy()
with open(app_json_path, 'w', encoding='utf-8') as f:
json.dump(app_json, f)
print('Done. Enjoy your 9 --> 1.5 GB Premiere Pro.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment