Skip to content

Commit

Permalink
improve demo_predictor to handle folder
Browse files Browse the repository at this point in the history
  • Loading branch information
bagustris committed Mar 22, 2024
1 parent 58da2eb commit 071705e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions nkululeko/demo_predictor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import pandas as pd
import numpy as np
import audiofile
import os

import audformat
import audiofile
import numpy as np
import pandas as pd

import nkululeko.glob_conf as glob_conf
from nkululeko.utils.util import Util

Expand Down Expand Up @@ -52,7 +55,7 @@ def run_demo(self):
file_list.append(line)
for file_name in file_list:
test_folder = glob_conf.config["DATA"]["test_folder"]
file_path = test_folder + file_name.strip()
file_path = os.path.join(test_folder, file_name.strip())
sig, sr = audiofile.read(file_path)
print(f"predicting file {file_path}")
res_dict = self.predict_signal(sig, sr)
Expand Down

0 comments on commit 071705e

Please sign in to comment.