How to convert audio byte stream to torch tensor?

Viewed 292

I am trying to convert bytes audio stream to PyTorch tensor as input to PyTorch's forward() function.

(To be more specific, I am using a Nemo Speaker model for speaker identification:

audio_signal, audio_signal_length = torch.tensor([audio]), torch.tensor([audio_length]) )

Does anyone know how to do this?

0 Answers
Related