If you want to generate subtitles for your video, you can use this notebook. All you need, is your input video file.
In order to fun the notebook, you will need to have an Azure Cognitive Services instance, and a key.
You will also need to have an ffmpeg and outputs folder in your current directory.
In the ffmpeg folder you will need to download ffmpeg and put the executable/binary in there.
- Log into the Azure portal
- Create a new resource group for your resources
- Click on the + at the top of the resource group to create a new resource.
- Look for Cognitive Services and click on it.
- Click Create.
- Make sure to select the proper resource group and region.
- Give your service a name and click Review + Create.
- Click on your Azure Cognitive Services instance.
- In the left pane, click Keys and Endpoints.
- Copy one of the two keys.
- Make note of the region.
- Download ffmpeg from here and put it in the ffmpeg folder.
- Create a .env file in the same folder with the following content:
SPEECH_KEY=<your-speech-key>
SPEECH_REGION=<your-speech-region>
SPEECH_FILE=<your-source-video-file-path>
SPEECH_LANGUAGE=<your-speech-language>
- Open the notebook in Jupyter Notebook/VS Code.
- Run all cells. I would recommend you run the cells one at a time and read the outputs/comments your first time around.