sr value changed to None
Browse files
README.md
CHANGED
|
@@ -119,7 +119,7 @@ id2label = model.config.id2label
|
|
| 119 |
```
|
| 120 |
```python
|
| 121 |
def preprocess_audio(audio_path, feature_extractor, max_duration=30.0):
|
| 122 |
-
audio_array, sampling_rate = librosa.load(audio_path, sr=
|
| 123 |
|
| 124 |
max_length = int(feature_extractor.sampling_rate * max_duration)
|
| 125 |
if len(audio_array) > max_length:
|
|
|
|
| 119 |
```
|
| 120 |
```python
|
| 121 |
def preprocess_audio(audio_path, feature_extractor, max_duration=30.0):
|
| 122 |
+
audio_array, sampling_rate = librosa.load(audio_path, sr=None)
|
| 123 |
|
| 124 |
max_length = int(feature_extractor.sampling_rate * max_duration)
|
| 125 |
if len(audio_array) > max_length:
|