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

Merge branch 'it18218640' into 'master'

some change keyword_spotting_service.py

See merge request !61
parents c7935084 75905151
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<excludeFolder url="file://$MODULE_DIR$/venv" /> <excludeFolder url="file://$MODULE_DIR$/venv" />
<excludeFolder url="file://$MODULE_DIR$/API/venv" /> <excludeFolder url="file://$MODULE_DIR$/API/venv" />
</content> </content>
<orderEntry type="jdk" jdkName="Python 3.9 (21_22j-38)" jdkType="Python SDK" /> <orderEntry type="jdk" jdkName="Python 3.9" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
</module> </module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (21_22j-38)" project-jdk-type="Python SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
</project> </project>
\ No newline at end of file
...@@ -37,8 +37,8 @@ class _Keyword_Spotting_Service: ...@@ -37,8 +37,8 @@ class _Keyword_Spotting_Service:
new_file_paths = new_file_path[1].split(".") new_file_paths = new_file_path[1].split(".")
print(f"1-{predicted_keyword}") # print(f"1-{predicted_keyword}")
print(f"2-{new_file_paths[0]}") # print(f"2-{new_file_paths[0]}")
if predicted_keyword == new_file_paths[0]: if predicted_keyword == new_file_paths[0]:
return predicted_keyword return predicted_keyword
...@@ -71,8 +71,18 @@ def Keyword_Spotting_service(): ...@@ -71,8 +71,18 @@ def Keyword_Spotting_service():
if __name__ == "__main__": if __name__ == "__main__":
kss = Keyword_Spotting_service() kss = Keyword_Spotting_service()
keyword1 = kss.predict("test/00f0204f_nohash_0.wav") keyword1 = kss.predict("test/black.wav")
# keyword2 = kss.predict("test/blu7.wav") keyword2 = kss.predict("test/blue.wav")
keyword3 = kss.predict("test/green.wav")
keyword4 = kss.predict("test/red.wav")
keyword5 = kss.predict("test/white.wav")
keyword6 = kss.predict("test/yellow.wav")
keyword7 = kss.predict("test/other.wav")
print(f"Predicted Keywords: {keyword1}") print(f"Predicted Keywords: {keyword1}")
# print(f"Predicted Keywords: {keyword2}") print(f"Predicted Keywords: {keyword2}")
\ No newline at end of file print(f"Predicted Keywords: {keyword3}")
print(f"Predicted Keywords: {keyword4}")
print(f"Predicted Keywords: {keyword5}")
print(f"Predicted Keywords: {keyword6}")
print(f"Predicted Keywords: {keyword7}")
\ No newline at end of file
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