Update audio2text/a2t.py
Browse files- audio2text/a2t.py +8 -1
audio2text/a2t.py
CHANGED
@@ -1,6 +1,13 @@
|
|
1 |
import librosa
|
2 |
import torch
|
3 |
-
from
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
LIMIT = 90 # limit 90 seconds
|
6 |
|
|
|
1 |
import librosa
|
2 |
import torch
|
3 |
+
from transformers import WhisperProcessor, WhisperForConditionalGeneration
|
4 |
+
|
5 |
+
# ArticMonkey:19.03.24:1700 example of version name in plaintext will be convert into hex using this site -> https://magictool.ai/tool/text-to-hex-converter/
|
6 |
+
# Here ArticMonkey is name of version and rest of all is data and time
|
7 |
+
|
8 |
+
checkpoint = "openai/whisper-base"
|
9 |
+
processor = WhisperProcessor.from_pretrained(checkpoint)
|
10 |
+
model = WhisperForConditionalGeneration.from_pretrained(checkpoint)
|
11 |
|
12 |
LIMIT = 90 # limit 90 seconds
|
13 |
|