Using the Whisper Python package without internet #718
Replies: 9 comments 3 replies
-
Once your model is downloaded under Lines 103 to 104 in 0b5dcfd |
Beta Was this translation helpful? Give feedback.
-
This is great! Thans, @jongwook ! |
Beta Was this translation helpful? Give feedback.
-
You can use it with no internet connection.
Jeffrey Duncan
…On Tue, Apr 4, 2023 at 9:02 AM bandaider ***@***.***> wrote:
I get the distinct impression, however, that Whisper will still try to
make a connection to the Internet-based model repo, even if the selected
model already exists in the MODEL_ROOT. Can anyone confirm/deny?
—
Reply to this email directly, view it on GitHub
<#718 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGW5A6A7J2BKIGVUZDCPHTW7QZXRANCNFSM6AAAAAATC4DWOA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I had to set the environment variable |
Beta Was this translation helpful? Give feedback.
-
I found that if you specify not the name of the model, but the actual filepath to an already downloaded model, then Whisper will not attempt to make an Internet connection. It will, however, do so, even if the model you have requested is located in the ROOT_DIR. You can look at the code and see this for yourself. |
Beta Was this translation helpful? Give feedback.
-
...Ok, so its possible. But how, exactly? Could somone please provide an example that I can copy paste, because I cant figure out how to do it. Connecting to the internet even once is not an option, the device these are running on are offline only.
ok @bandaider, but specify how, exactly? I've tried all of the following and it fails every time.
I've tried a bunch of other permutations I cant remember, but no matter what I try it either gives me an error like "error: argument --model: invalid choice:" or an http error. |
Beta Was this translation helpful? Give feedback.
-
@mstyp For clarification, I was able to force Whisper to use the model provided without an attempt to download (or verify the file) through the Python API. I can't say that I tried to do so from the command-line, but one would think they would act the same. It seems that what you are doing is correct so perhaps the behavior is different from the command-line? |
Beta Was this translation helpful? Give feedback.
-
Hrm. Well, I made a file called wiz.py with the following based on the github readme:
Then ran
I've not done as joezuntz suggested and "run once online to download the files to that dir" since I cant run it online once, but i dont know if that matters. |
Beta Was this translation helpful? Give feedback.
-
I have a guide for how to setup and use Whisper offline https://github.com/nicholasgcotton/WhisperDO It's EASIER to do the setup part online and then just USE it offline, but if necessary you can get pip to create offline install packages and move them over without the target machine ever being on the internet. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The current whisper Python package always downloads the pre-trained model, which requires an internet connection. It would be cool if we could download the pre-trained model once and use it afterward as many times as we wanted. Does anyone know how to do it?
Beta Was this translation helpful? Give feedback.
All reactions