Skip to content

Commit

Permalink
fix sample size beeing slightly wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
gferraro committed Aug 27, 2023
1 parent f85866b commit 1f4bc1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Melt/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def parse_args():
parser.add_argument("file", help="Audio file to run on")

args = parser.parse_args()
if len(args.bird_model) == 0:
if args.bird_model is None or len(args.bird_model) == 0:
args.bird_model = ["/models/bird-model"]

return args
Expand Down
2 changes: 1 addition & 1 deletion Melt/identify_tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def load_samples(
data = frames[int(start * sr) : int(end * sr)]
if len(data) != sample_size:
sample = np.zeros((sample_size))
sample[: len(data)] = data
sample[:sample_size] = data[:sample_size]
data = sample
spect = get_spect(
data,
Expand Down

0 comments on commit 1f4bc1b

Please sign in to comment.