diff --git a/tonu.py b/tonu.py new file mode 100644 index 0000000..22712bf --- /dev/null +++ b/tonu.py @@ -0,0 +1,17 @@ +import sys +import os +from data import featurelen +from UModel import UModel + +if __name__ == '__main__': + model = UModel(featurelen) + + if len(sys.argv)<2: + print("Using \n\tpython tonu.py audiofile | audiolist.txt | folder") + else: + device = 'cpu' + model.to(device) + audiofile = sys.argv[1] + print(f"\n======================\nRecognizing file {audiofile}") + txt = model.predict(audiofile,device) + print("%s -> %s" %(os.path.basename(audiofile),txt))