Views
No views yet
pip install speechbrainpip install transformerspy_module_file=custom_interface.py is used as an external Predictor class into this HF repos. We use the foreign_class function from speechbrain.pretrained.interfaces that allows you to load your custom model.1from speechbrain.inference.interfaces import foreign_class
2device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
3asr_classifier = foreign_class(source="Macedonian-ASR/buki-whisper-2.0", pymodule_file="custom_interface.py", classname="ASR")
4asr_classifier = asr_classifier.to(device)
5predictions = asr_classifier.classify_file("audio_file.wav", device)
6print(predictions)python train.py hyperparams.yamltrain.py file contains the functions necessary for training the model and hyperparams.yaml contains the hyperparameters. For more details about training the model, refer to the SpeechBrain documentation.