Torchaudio in C++

Hi,
I am using torchaudio in python to read wave files. However, torchaudio isn’t available in C++, so is there any alternate way to do this?

The discussion topic above is for the same issue. The solution provided there point to a page (https://github.com/pytorch/audio/blob/master/torchaudio/torch_sox.cpp) that does not exist.

Hello @ptrblck, can you help me with this please?

I guess the current approach would be to use torchaudio::sox::load_audio_file from torchaudio/csrs/sox/io.cpp.

Thank you, I will try it out!

Please use torchaudio::io::StreamReader.

https://pytorch.org/audio/main/libtorchaudio.stream_reader.html

Thank you, I will check it out.