![]() We can do this by running the command: !whisper AUDI_FILE -model medium It’s faster, but not as accurate as a larger model. There are many different types of models, each designed for a specific purpose.īy default it it uses the small model. The model is trained to recognize speech and convert it to text for the user. Whisper’s ModelsĪ model is a statistical representation of the speech to text engine. You can read more about Whisper’s models here. When it’s finished you can find the transcription files in the same directory, in the file browser: Transcription Files Using Whisper Models Whisper Transcribing Never Gonna Give You Up by Rick Astley In less than a minute it should start transcribing. !whisper "Rick Astley - Never Gonna Give You Up Official Music Video.mp3" If this is the first time you’re running Whisper, it will first download some dependencies. Next we can simply run Whisper to transcribe the audio file using the following command. Drag & Drop Upload in File Browser in Google Colab Run Whisper to Transcribe Speech to Text Now you can press the upload file button at the top of the file browser, or just drag and drop a file from your computer and wait for it to finish uploading. To do this open the File Browser at the left of the notebook, by pressing the folder icon. Now we can upload a file to transcribe it. If you’re using Whisper on your computer, in a terminal, then don’t use the ! at the beginning of the line. Note: We’re prefixing every command with ! because that’s how Google Colabs works when using shell scripts, instead of Python. !sudo apt update & sudo apt install ffmpeg The install process should take 1-2 minutes. To run the commands click the play button at the left of the cell or press Ctrl + Enter. To install it just paste the following lines in a cell. (You can also check install instructions in the official Github repository). Set GPU as Hardware Accelerator Install Whisper Make sure GPU is selected and click Save. Under Hardware accelerator there’s a dropdown. To do this, in our Google Colab menu go to Runtime > Change runtime type. Google often allocates us a GPU by default, but not always. Next we want to make sure our notebook is using a GPU. Create a Google Colab Notebook in Google Drive Enable GPU It’s called Untitled.ipynb but you can rename it anything you want. A new tab will open with your new notebook. To do that you can just visit this link and Google will generate a new Colab notebook for you.Īlternatively you can go anywhere in your Google Drive > Right Click (in an empty space like you want to create a new file) > More > Google Colaboratory. Open a Google Colab Notebookįirst we’ll need to open a Colab Notebook. For example, on my computer ( CPU I7-7700k/ GPU 1660 SUPER) I’m transcribing 30s in a few minutes, whereas on Google Colab it’s a few seconds. If you don’t have a powerful computer or don’t have experience with Python, using Whisper on Google Colab will be much faster and hassle free. For a quick beginner friendly intro feel free to check out our tutorial on Google Colab to get comfortable with it. You can use Google Colab on any device and you don’t have to download anything. Essentially Google Colab is like Google Docs, but for coding in Python. Google Colab is a cloud-based service that allows users to write and execute code in a web browser.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |