Accessing sdr_rtl output stream programatically in a buffer

Need help installing or figuring out something about your SDR? Ask here.
Post Reply
MaximeE
Posts: 1
Joined: Sat Dec 01, 2018 1:32 pm

Accessing sdr_rtl output stream programatically in a buffer

Post by MaximeE » Sat Dec 01, 2018 1:42 pm

Hi !

I am trying to build a project with my rtl-sdr dongle. The idea is to process the radio audio signal through a machine learning model. My model currently takes 10 seconds wav files as input and converts them to numpy arrays that are further processed and then classified.

I would like to classify 10 seconds audio chunks directly when they are generated by my dongle. I figured I would probably need to take a look at PyAudio to generate my chunks, however I don't really get how i could define my r820T dongle as a source.

Does anyone know how to access the stream generated by an rtl-sdr dongle directly as python numpy array ? Or maybe how to pipe the stream from rtl_fm reliably to a python progam ?

Thanks in advance !

hotpaw2
Posts: 144
Joined: Sat Jan 14, 2017 11:07 pm
Contact:

Re: Accessing sdr_rtl output stream programatically in a buffer

Post by hotpaw2 » Sun Dec 02, 2018 8:21 pm

The stream generated by an RTL-SDR (which can be accessed by librtlsdr) is baseband IQ data, not audio. So your best bet is the latter: a pipe from rfl_fm.

Post Reply