Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
fix(audio preprocessor): filter audio with zero length
Browse files Browse the repository at this point in the history
  • Loading branch information
jemmyshin committed Aug 12, 2019
1 parent 36babba commit b0f22d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gnes/preprocessor/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def get_audio(buffer_data, sample_rate, interval,
# has multiple channels, do average
if len(data.shape) == 2:
data = np.mean(data, axis=1)
audio_list.append(data)
if data.shape[0] != 0:
audio_list.append(data)

start_time = end_time

Expand Down

0 comments on commit b0f22d0

Please sign in to comment.