Create config.py
Browse files- audio_processing/config.py +16 -0
audio_processing/config.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import torch
|
2 |
+
|
3 |
+
from transformers import pipeline
|
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 |
+
device = 0 if torch.cuda.is_available() else "cpu"
|
9 |
+
|
10 |
+
checkpoint = "openai/whisper-medium"
|
11 |
+
pipe = pipeline(
|
12 |
+
"automatic-speech-recognition",
|
13 |
+
model=checkpoint,
|
14 |
+
device=device,
|
15 |
+
chunk_length_s=30,
|
16 |
+
)
|