Это код, который дает сбой:
Код: Выделить всё
try:
print(f"This gets printed")
model = WhisperModel(model_source_path, device="cpu", compute_type="int8")
print(f"But this does not get printed.")
except Exception as e:
print(f"Error loading model: {e}")
print("This also never gets printed.")
exit()
Код: Выделить всё
Loading Whisper model from local path: 'C:\Users\Olenb\PycharmProjects\Accessability\dist\WhisperApp\_internal\models\base'...
This gets printed
Это команда PyInstaller, которую я использовал (я получил ее от Gemini AI):
Код: Выделить всё
pyinstaller --onedir --name "WhisperApp" --collect-all faster_whisper --collect-all CTranslate2 --collect-all onnxruntime --hidden-import pygame --add-data "models/*;models" --add-data "RecordingSound.mp3;." "Whisper.py"
Код: Выделить всё
1358 WARNING: collect_data_files - skipping data collection for module 'CTranslate2' as it is not a package.
1358 WARNING: collect_dynamic_libs - skipping library collection for module 'CTranslate2' as it is not a package.
282 WARNING: Failed to collect submodules for 'onnxruntime.quantization' because importing 'onnxruntime.quantization' raised: ModuleNotFoundError: No module named 'onnx'
Подробнее здесь: https://stackoverflow.com/questions/798 ... g-ai-model
Мобильная версия