infer module
- infer.predict(model, audio, device)[source]
Function that return the prediction of the model, i.e the argmax of the softmax of the logits.
- Parameters:
model (nn.Module) – pytorch neural network
audio (torch.tensor) – audio tensor
device (torch.device) – Preferably cpu
- Returns:
predicted label
- Return type:
str