Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,8 +23,8 @@ def transcribe_and_analyze(audio_path):
|
|
| 23 |
audio = audio_tensor.numpy() # Convert back to numpy array
|
| 24 |
|
| 25 |
# Process audio with Whisper
|
| 26 |
-
input_features = model(audio)
|
| 27 |
-
|
| 28 |
print(input_features)
|
| 29 |
print('trans')
|
| 30 |
predicted_ids = model.generate(input_features.input_features)
|
|
|
|
| 23 |
audio = audio_tensor.numpy() # Convert back to numpy array
|
| 24 |
|
| 25 |
# Process audio with Whisper
|
| 26 |
+
# input_features = model(audio)
|
| 27 |
+
input_features = processor(audio, sampling_rate=16000, return_tensors="pt")
|
| 28 |
print(input_features)
|
| 29 |
print('trans')
|
| 30 |
predicted_ids = model.generate(input_features.input_features)
|