Spaces:
Build error
Build error
Commit ·
fcdc02f
1
Parent(s): 61f52ca
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,8 +8,8 @@ asr_model = pipeline("automatic-speech-recognition", model="openai/whisper-small
|
|
| 8 |
def transcribe(file_path):
|
| 9 |
# Load the audio file with librosa
|
| 10 |
data, samplerate = librosa.load(file_path, sr=None)
|
| 11 |
-
# Pass the audio data to the model for transcription
|
| 12 |
-
transcription = asr_model(data
|
| 13 |
return transcription["text"]
|
| 14 |
|
| 15 |
# Create the Gradio interface
|
|
|
|
| 8 |
def transcribe(file_path):
|
| 9 |
# Load the audio file with librosa
|
| 10 |
data, samplerate = librosa.load(file_path, sr=None)
|
| 11 |
+
# Pass the audio data to the model for transcription without specifying sampling_rate
|
| 12 |
+
transcription = asr_model(data)
|
| 13 |
return transcription["text"]
|
| 14 |
|
| 15 |
# Create the Gradio interface
|