Test: ran the code and checked for ffmpeg functionality
This commit is contained in:
@@ -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:
|
||||||
|
|
||||||
|
|||||||
@@ -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
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user