-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To .exe #36
Comments
По умолчанию Вы можете указать каталог для загрузки модели, используя параметр whisper.load_model(model, download_root='download/models/here') Теперь модели будут загружаться в указанный каталог. Если вы хотите загрузить уже загруженную модель, вы можете передать путь к файлу контрольной точки вместо имени модели: whisper.load_model('path/to/base.pt') В моем проекте transcriber_app я использую cx_Freeze, чтобы упаковать программу в exe. Вы можете посмотреть скрипт настройки в качестве примера того, как использовать cx_Freeze, но это для графического приложения, а не для консольной программы. cx_Freeze будет упаковывать все зависимости Python вместе с исполняемым файлом Python в exe, но учтите, что версия PyTorch для CUDA занимает более гигабайта, поэтому exe-файл будет большим. By default You can specify which directory to download the model to by using the whisper.load_model(model, download_root='download/models/here') Now the models will be downloaded to the specified directory. If you want to load an already downloaded model you can pass the path to the checkpoint file instead of a model name: whisper.load_model('path/to/base.pt') In my transcriber_app project I use cx_Freeze to package the program as an exe. You can see the setup script used as an example of how to use cx_Freeze but this is for a GUI app, not a console program. cx_Freeze will package all the python dependencies along with the python executable into an exe, but beware the CUDA version of PyTorch is over a gigabyte in size so the exe will be large. |
Спасибо большое, что все так детально пояснил. У меня получилось указать место для модели, а вот с компиляцией пока вопрос. Сам процесс проходит нормально, но итоговый файл запускается и сразу выключается. Может нужен графический интерфейс? Вопрос, как в твоем коде поставить язык для модели whisper? |
Вы можете установить язык с помощью параметра result = audio_model.transcribe(temp_file, fp16=torch.cuda.is_available(), language="ru") Список доступных языков можно найти здесь: https://github.com/openai/whisper/blob/main/whisper/tokenizer.py#L10 You can set the language with the result = audio_model.transcribe(temp_file, fp16=torch.cuda.is_available(), language="ru") The list of available languages is here: https://github.com/openai/whisper/blob/main/whisper/tokenizer.py#L10 |
Спасибо большое, все получилось. У меня вышло компилировать лишь с помощью Nuitka, но главное, что получилось. |
is there any update on this? |
can it be converted to desktop app now? |
Хочу компилировать твой замечательный код, чтобы на выходе быть .exe файл со всеми зависимостями. Скажи как можно указать место, куда будет скачиваться модель whisper?
The text was updated successfully, but these errors were encountered: