Spaces:
Paused
Paused
MikeTangoEcho
commited on
Commit
•
84db0d0
1
Parent(s):
48b9b5d
fix: app.py
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: 🎤
|
4 |
sdk: gradio
|
5 |
sdk_version: 5.5.0
|
|
|
1 |
---
|
2 |
+
title: ASRNERSBX
|
3 |
emoji: 🎤
|
4 |
sdk: gradio
|
5 |
sdk_version: 5.5.0
|
app.py
CHANGED
@@ -46,7 +46,7 @@ def transcribe(audio: str | Path | bytes | tuple[int, np.ndarray] | None):
|
|
46 |
# https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline.__call__
|
47 |
# Whisper input format for tuple differ from output provided by gradio audio component
|
48 |
if asr_model.startswith("openai/whisper"):
|
49 |
-
inputs = {"sampling_rate": audio[0], "raw": audio[1]} if type(audio) is tuple
|
50 |
transcript = asr(inputs)
|
51 |
text = transcript['text']
|
52 |
|
|
|
46 |
# https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline.__call__
|
47 |
# Whisper input format for tuple differ from output provided by gradio audio component
|
48 |
if asr_model.startswith("openai/whisper"):
|
49 |
+
inputs = {"sampling_rate": audio[0], "raw": audio[1]} if type(audio) is tuple else audio
|
50 |
transcript = asr(inputs)
|
51 |
text = transcript['text']
|
52 |
|