Spaces:
Runtime error
Runtime error
Suparnpreet
commited on
Commit
•
99a3e70
1
Parent(s):
db493e0
Update transcribe.py
Browse files- transcribe.py +13 -10
transcribe.py
CHANGED
@@ -1,10 +1,13 @@
|
|
1 |
-
import whisper
|
2 |
-
import numpy as np
|
3 |
-
from scipy.io.wavfile import read
|
4 |
-
import torch
|
5 |
-
import whisper
|
6 |
-
def transcibe(audio):
|
7 |
-
|
8 |
-
|
9 |
-
print(
|
10 |
-
|
|
|
|
|
|
|
|
1 |
+
import whisper
|
2 |
+
import numpy as np
|
3 |
+
from scipy.io.wavfile import read
|
4 |
+
import torch
|
5 |
+
import whisper
|
6 |
+
def transcibe(audio):
|
7 |
+
print("Started trans....")
|
8 |
+
model = whisper.load_model("base")
|
9 |
+
print("Model Loded...")
|
10 |
+
result = model.transcribe(audio)
|
11 |
+
print("Transcribed")
|
12 |
+
print(result["text"])
|
13 |
+
return result["text"]
|