Commit 43b7970f authored by W.D.R.P. Sandeepa's avatar W.D.R.P. Sandeepa

changed predict keyword

parent aa3c782d
......@@ -31,7 +31,19 @@ class _Keyword_Spotting_Service:
predicted_index = np.argmax(predictions)
predicted_keyword = self._mappings[predicted_index]
# return predicted_keyword
new_file_path = file_path.split("/")
new_file_paths = new_file_path[1].split(".")
print(f"1-{predicted_keyword}")
print(f"2-{new_file_paths[0]}")
if predicted_keyword == new_file_paths[0]:
return predicted_keyword
else:
return "No Prediction"
def preprocess(self, file_path, n_mfcc=13, n_fft=2048, hop_length=512):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment