Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def generate_text(audio):
|
|
22 |
sr, data = audio # Unpack the tuple
|
23 |
print(sr, data.dtype)
|
24 |
|
25 |
-
data = data.astype(np.float32)
|
26 |
data = librosa.resample(data, orig_sr=sr, target_sr=16000)
|
27 |
sr = 16000
|
28 |
|
|
|
22 |
sr, data = audio # Unpack the tuple
|
23 |
print(sr, data.dtype)
|
24 |
|
25 |
+
data = data.astype(np.float32) / 32768.0
|
26 |
data = librosa.resample(data, orig_sr=sr, target_sr=16000)
|
27 |
sr = 16000
|
28 |
|