Comments (6)
Вы можете установить язык с помощью параметра
language
в функции transcribe: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
language
parameter in the transcribe function: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, но главное, что получилось.
from whisper_real_time.
По умолчанию whisper.load_model(model)
будет помещать модели в папку кэша, ~/.cache/whisper
в Linux и Mac и C:\Users\USER\.cache\whisper
в Windows. Вам не нужно ничего делать, модели будут загружены в эту папку, когда будет вызвана функция load_model
.
Вы можете указать каталог для загрузки модели, используя параметр download_root
:
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 whisper.load_model(model)
will put the models in a cache folder, ~/.cache/whisper
on Linux and Mac and C:\Users\USER\.cache\whisper
on Windows. You do not have to do anything, the models will be downloaded to this folder when the load_model
is called.
You can specify which directory to download the model to by using the download_root
parameter:
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.
from whisper_real_time.
Спасибо большое, что все так детально пояснил. У меня получилось указать место для модели, а вот с компиляцией пока вопрос. Сам процесс проходит нормально, но итоговый файл запускается и сразу выключается. Может нужен графический интерфейс?
Вопрос, как в твоем коде поставить язык для модели whisper?
from whisper_real_time.
Вы можете установить язык с помощью параметра language
в функции transcribe:
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 language
parameter in the transcribe function:
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
from whisper_real_time.
is there any update on this?
from whisper_real_time.
can it be converted to desktop app now?
from whisper_real_time.
Related Issues (20)
- Why does it take almost 15000-20000ms latency to deliver the text ? HOT 1
- Irrelevant Output
- whisper real-time from Jetson Nano HOT 2
- WRT on Windows HOT 1
- How to get transcription in a text file HOT 3
- Infinite loop management
- Kudos
- Wow, what a great job. BOL!!!
- Optimal values for the VAD filter?
- Pyaudio install fails when installing requirements.txt HOT 3
- Question about pytorch HOT 1
- Here's how I run it on Mac M2
- Malayalam (ml) didnt work
- how release a mic?
- multi party
- Some text is replaced by later parts of the sentence HOT 2
- Error loading "\lib\site-packages\torch\lib\shm.dll" or one of its dependencies
- SSL: CERTIFICATE_VERIFY_FAILED
- It does not take audio properly
- Im sorry but can someone please help me to run this?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whisper_real_time.