Spaces:
Sleeping
Sleeping
AshDavid12
commited on
Commit
·
6d8f3bd
1
Parent(s):
f10feac
trying to build-tempdir
Browse files
infer.py
CHANGED
@@ -7,6 +7,7 @@ import logging
|
|
7 |
import torch
|
8 |
import sys
|
9 |
import requests
|
|
|
10 |
|
11 |
import whisper_online
|
12 |
|
@@ -37,6 +38,7 @@ logging.info(f"Selected model name: {model_name}")
|
|
37 |
try:
|
38 |
lan = 'he'
|
39 |
logging.info(f"Attempting to initialize FasterWhisperASR with device: {device}")
|
|
|
40 |
model = whisper_online.FasterWhisperASR(lan=lan, modelsize=model_name, cache_dir=None, model_dir=None)
|
41 |
logging.info("FasterWhisperASR model initialized successfully.")
|
42 |
except Exception as e:
|
@@ -198,4 +200,4 @@ def transcribe_core_whisper(audio_file):
|
|
198 |
logging.info("Transcription core function completed.")
|
199 |
return ret
|
200 |
|
201 |
-
runpod.serverless.start({"handler": transcribe_whisper})
|
|
|
7 |
import torch
|
8 |
import sys
|
9 |
import requests
|
10 |
+
import os
|
11 |
|
12 |
import whisper_online
|
13 |
|
|
|
38 |
try:
|
39 |
lan = 'he'
|
40 |
logging.info(f"Attempting to initialize FasterWhisperASR with device: {device}")
|
41 |
+
cache_dir = os.environ.get('XDG_CACHE_HOME', tempfile.gettempdir())
|
42 |
model = whisper_online.FasterWhisperASR(lan=lan, modelsize=model_name, cache_dir=None, model_dir=None)
|
43 |
logging.info("FasterWhisperASR model initialized successfully.")
|
44 |
except Exception as e:
|
|
|
200 |
logging.info("Transcription core function completed.")
|
201 |
return ret
|
202 |
|
203 |
+
#runpod.serverless.start({"handler": transcribe_whisper})
|