Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,7 +70,7 @@ def convert_to_wav(filepath):
|
|
| 70 |
pipe = pipeline("automatic-speech-recognition", model="NbAiLab/nb-whisper-large", chunk_length_s=30, generate_kwargs={'task': 'transcribe', 'language': 'no'})
|
| 71 |
|
| 72 |
@spaces.GPU()
|
| 73 |
-
def transcribe_audio(
|
| 74 |
|
| 75 |
with tempfile.NamedTemporaryFile(suffix=".wav") as temp_audio_file:
|
| 76 |
# Copy the contents of the uploaded audio file to the temporary file
|
|
|
|
| 70 |
pipe = pipeline("automatic-speech-recognition", model="NbAiLab/nb-whisper-large", chunk_length_s=30, generate_kwargs={'task': 'transcribe', 'language': 'no'})
|
| 71 |
|
| 72 |
@spaces.GPU()
|
| 73 |
+
def transcribe_audio(audio_file, batch_size=16):
|
| 74 |
|
| 75 |
with tempfile.NamedTemporaryFile(suffix=".wav") as temp_audio_file:
|
| 76 |
# Copy the contents of the uploaded audio file to the temporary file
|