BLOG #03

Setting Up OpenAI Whisper for Speech-to-Text

December 12, 2024

For Codes, Refer to This Repo

https://github.com/Manav47699/openai_whisper-tiny_fastapi_stt.git

1

Step 1: Install necessary tool

bash
sudo apt install ffmpeg       # whisper can't work without this

💡 It is a system level tool which reads audio files, converts audio formats, extracts raw audio for whisper and SO ON.

2

Step 2: Install necessary dependencies (virtual env recommended)

bash
pip install openai-whisper
pip install torch --index-url https://download.pytorch.org/whl/cpu      # to download the cpu only version
# pip install torch # to install the default version
⚠️

NOTE

Make sure to install other necessary dependencies according to need such as fastapi, langchain etc.