import sys import torch from tokenizer import PhonologicalTokenizer def main(): if len(sys.argv) != 2: print("Usage: python inference.py path/to/audio.wav") sys.exit(1) wav_path = sys.argv[1] device = "cuda" if torch.cuda.is_available() else "cpu" tokenizer = PhonologicalTokenizer(device=device) with torch.no_grad(): clusters = tokenizer(wav_path) print(clusters) if __name__ == "__main__": main()