Spaces:
Runtime error
Runtime error
Update app.py
Browse filesEdited the chunk size for accomodating 5s of audio clips
app.py
CHANGED
@@ -77,7 +77,7 @@ if uploaded_file is not None:
|
|
77 |
st.write("Analsysing...")
|
78 |
audio_bytes = uploaded_file.getvalue()
|
79 |
audio_array = np.frombuffer(audio_bytes, dtype=np.int16)
|
80 |
-
chunk_size =
|
81 |
num_chunks = len(audio_array) // chunk_size
|
82 |
waveform_chunks = np.array_split(audio_array[:num_chunks * chunk_size], num_chunks)
|
83 |
snore, other = process_data(waveform_chunks)
|
|
|
77 |
st.write("Analsysing...")
|
78 |
audio_bytes = uploaded_file.getvalue()
|
79 |
audio_array = np.frombuffer(audio_bytes, dtype=np.int16)
|
80 |
+
chunk_size = 80000
|
81 |
num_chunks = len(audio_array) // chunk_size
|
82 |
waveform_chunks = np.array_split(audio_array[:num_chunks * chunk_size], num_chunks)
|
83 |
snore, other = process_data(waveform_chunks)
|