Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ os.makedirs("responses", exist_ok=True)
|
|
37 |
# Transcription function
|
38 |
device = 0 if torch.cuda.is_available() else -1
|
39 |
def transcribe(audio, language):
|
40 |
-
asr = pipeline("automatic-speech-recognition", model=model_map[language], device=device)
|
41 |
text = asr(audio)["text"]
|
42 |
return text, audio
|
43 |
|
|
|
37 |
# Transcription function
|
38 |
device = 0 if torch.cuda.is_available() else -1
|
39 |
def transcribe(audio, language):
|
40 |
+
asr = pipeline("automatic-speech-recognition", model=model_map[language], device=device, token=HF_TOKEN)
|
41 |
text = asr(audio)["text"]
|
42 |
return text, audio
|
43 |
|