-
RAM: 3 GB (Original_Model: 6GB)
-
VRAM: 3.7 GB (Original_Model: 11GB)
-
test.wav: 23 s (Multilingual Speech i.e. English+Hindi)
- Time in seconds for Processing by each device
| Device Name | float32 (Original) | float16 | CudaCores | TensorCores |
|---|
| 3060 | 2.2 | 1.3 | 3,584 | 112 |
| 1660 Super | OOM | 6 | 1,408 | N/A |
| Collab (Tesla T4) | - | - | 2,560 | 320 |
| Collab (CPU) | - | N/A | N/A | N/A |
| M1 (CPU) | - | - | N/A | N/A |
| M1 (GPU -> 'mps') | - | - | N/A | N/A |
- NOTE: TensorCores are efficient in mixed-precision calculations
- CPU -> torch.float16 not supported on CPU (AMD Ryzen 5 3600 or Collab CPU)
-
Punchuation: Sometimes False ('I don't know the exact reason why this is happening')
Firstly, clone this repo and place all the files inside a folder.
1git lfs install
2git clone https://huggingface.co/devasheeshG/whisper_large_v2_fp16_transformers
1# Import the Model
2from whisper_large_v2_fp16_transformers import Model, load_audio, pad_or_trim
1# Initilise the model
2model = Model(
3 model_name_or_path='whisper_large_v2_fp16_transformers',
4 cuda_visible_device="0",
5 device='cuda',
6 )
1# Load Audio
2audio = load_audio('whisper_large_v2_fp16_transformers/test.wav')
3audio = pad_or_trim(audio)
1# Transcribe (First transcription takes time)
2model.transcribe(audio)