Spaces:
Sleeping
Sleeping
Nico8800
commited on
Commit
•
700517f
1
Parent(s):
d296c34
add transcribe func
Browse files
Modules/Speech2Text/transcribe.py
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import whisper
|
2 |
+
|
3 |
+
def transcribe(audio_path):
|
4 |
+
model = whisper.load_model("base")
|
5 |
+
result = model.transcribe(audio_path)
|
6 |
+
return result.text
|