Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ from transformers import AutoConfig, AutoModel, Wav2Vec2FeatureExtractor
|
|
10 |
import librosa
|
11 |
import numpy as np
|
12 |
import subprocess
|
|
|
13 |
|
14 |
TRUST = True
|
15 |
SR = 16000
|
@@ -46,9 +47,9 @@ print(device)
|
|
46 |
|
47 |
|
48 |
def recognize(audio, state={}):
|
|
|
49 |
sr, audio_array = audio
|
50 |
audio_array = audio_array.astype(np.float32)
|
51 |
-
print(sr, audio_array)
|
52 |
state = predict(audio_array, sr)
|
53 |
return state, state
|
54 |
|
|
|
10 |
import librosa
|
11 |
import numpy as np
|
12 |
import subprocess
|
13 |
+
import time
|
14 |
|
15 |
TRUST = True
|
16 |
SR = 16000
|
|
|
47 |
|
48 |
|
49 |
def recognize(audio, state={}):
|
50 |
+
time.sleep(2)
|
51 |
sr, audio_array = audio
|
52 |
audio_array = audio_array.astype(np.float32)
|
|
|
53 |
state = predict(audio_array, sr)
|
54 |
return state, state
|
55 |
|