{"id":5291,"date":"2025-05-20T22:28:18","date_gmt":"2025-05-20T22:28:18","guid":{"rendered":"https:\/\/www.qworqs.com\/blog\/?p=5291"},"modified":"2025-05-20T22:42:52","modified_gmt":"2025-05-20T22:42:52","slug":"installing-whisper-ai-to-a-an-entry-level-gpu","status":"publish","type":"post","link":"https:\/\/www.voodoo.business\/blog\/2025\/05\/20\/installing-whisper-ai-to-a-an-entry-level-gpu\/","title":{"rendered":"Installing Whisper AI to a an entry level GPU"},"content":{"rendered":"\n<p>Obviously, as you can see from my blog, I have a bunch of high end GPUs for my AI work, the GPU I use on my daily driver PC on the other hand is a complete joke (Nvidia rtx 1650) with 4GB of ram&#8230; Not exactly a GPU you would use for anything remotely demanding<\/p>\n\n\n\n<p>But running whisper on my local machine is very convinient, the audio files are already there, no need to login to any remote machines and the like, so i will be installing a small version of whisper here, and let us see how this ancient GPU does<\/p>\n\n\n\n<p>1- I already have Python 3.12.7 installed, if you don&#8217;t, then &#8220;sudo apt install python3 python3-pip&#8221;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>python3 -m venv whisper-env<\/code><\/pre>\n\n\n\n<p>And activate it<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">source whisper-env\/bin\/activate<br><br><\/pre>\n\n\n\n<p>Now, before you procede, if you want your &#8220;HuggingFace&#8221; directory on a different drive or something (Where the models actually live), you should start by adding the following line to ~\/.bashrc or whatever your system uses, also remember to either run (<code>source ~\/.bashrc<\/code>) or to close and open your terminal again for the changes to take effect<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">export HF_HOME=\/mnt\/bigdrive\/huggingface<\/pre>\n\n\n\n<p>Now, let us go ahead and install faster-whisper<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>pip install faster-whisper<\/code><\/pre>\n\n\n\n<p>Also, make sure PyTorch with GPU support is available:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pip install torch torchvision torchaudio --index-url https:\/\/download.pytorch.org\/whl\/cu118<\/pre>\n\n\n\n<p>Test GPU availability:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>python3 -c \"import torch; print(torch.cuda.is_available())\"<\/code><\/pre>\n\n\n\n<p>Now, I thought tiny would be the correct size that suits my GPU, but it turned out &#8220;mini&#8221;base&#8221; works just fine !<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>faster-whisper sample.wav --model-size base --compute-type float16<\/code><\/pre>\n\n\n\n<p>How do we know if we are hitting the GPU limits ?<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>watch -n 1 nvidia-smi<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Obviously, as you can see from my blog, I have a bunch of high end GPUs for my AI work, the GPU I use on my daily driver PC on the other hand is a complete joke (Nvidia rtx 1650) with 4GB of ram&#8230; Not exactly a GPU you would use for anything remotely demanding [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5291","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/5291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/comments?post=5291"}],"version-history":[{"count":6,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/5291\/revisions"}],"predecessor-version":[{"id":5298,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/5291\/revisions\/5298"}],"wp:attachment":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/media?parent=5291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/categories?post=5291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/tags?post=5291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}