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

Merge branch 'it18218640' into 'master'

change Keyword_Spotting_service file

See merge request !67
parents 402ac456 235234ed
......@@ -18,7 +18,7 @@ class _Keyword_Spotting_Service:
]
_instance = None
def predict(self, file_path):
def predict(self, file_path, FPFN):
# extract MFCCs
MFCCs = self.preprocess(file_path) # (# segment, # coefficients)
......@@ -33,14 +33,7 @@ class _Keyword_Spotting_Service:
# 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]:
if predicted_keyword == FPFN:
return predicted_keyword
else:
return "No Prediction"
......
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