Test: ran the code and checked for ffmpeg functionality

This commit is contained in:
Orihara Izaya
2023-10-09 18:13:32 +02:00
parent dc2ee55c4a
commit df1a3c075b
5 changed files with 11 additions and 5 deletions
+7 -1
View File
@@ -12,11 +12,17 @@ Before running this script, make sure to install the necessary python packages u
pip install -r requirements.txt pip install -r requirements.txt
``` ```
If your system does not have ffmpeg installed you can install it via:
```bash
sudo apt install ffmpeg
```
## Running the script ## Running the script
To generate transcripts create a new job with your specifications (see jobs section below). To generate transcripts create a new job with your specifications (see jobs section below).
<br/> <br/>
If you need to download the transcriber model (not saved in `data/models` yet) set your huggingface token: If you need to download the transcriber model set your huggingface token:
On Linux/Mac: On Linux/Mac:
View File
+2
View File
@@ -1,5 +1,7 @@
youtube-dl youtube-dl
pytube pytube
pydub pydub
ffmpeg-python
ffprobe
torch torch
git+https://github.com/m-bain/whisperx.git git+https://github.com/m-bain/whisperx.git
+2 -4
View File
@@ -102,14 +102,12 @@ class Transcriber:
logger.exception("Failed to save transcript: %s", e) logger.exception("Failed to save transcript: %s", e)
raise raise
def _clear_memory(self): @staticmethod
def _clear_memory():
""" """
Clear GPU memory. Clear GPU memory.
""" """
try: try:
del self.transcription_model
del self.alignment_model
del self.metadata
gc.collect() gc.collect()
torch.cuda.empty_cache() torch.cuda.empty_cache()
except Exception as e: except Exception as e: