Closed jpramirez closed 9 years ago
This seems cool. What would be a use case?
If you can talk a little more about a use case and your proposed addition to the dejavu api that wouldn't break backwards compatibility, I'd certainly accept a PR.
A typical usage will be a core developer for example that is using pyradio or developing his own detection system, sometimes and in this days, we rarely have a "real radio" connected or even listen to mp3. right? so we base almost anything we do online , radios, tv etc. For that reasong this feature will be cool. The user present a new source, a stream that can be converted with gstreamer, ffmpeg or whatever to raw format mp3 , etc and either create a virtual output device or output to a file (for recording and decoding later). So basically after that we create a new sink in dejavu or read from a stream, the same way that you did with the microphone.
So, at any given time the user put an url, gst or ffmpeg(avconv) reads it and pass it along to dejavu to create the matching. This will not affect the fingerprinting, just the Recogn part.
Sorry if i make it more complicated ( many hours without sleep by now :) )
OK, that sounds great and I would gladly accept your PR. What would you like the API to look like as an example?
The API can probably be extended with a fingerprint_stream
of sorts, that accepts something with a read
method.
The bigger problem is that most of the fingerprinting code currently assumes it has the whole audio track at hands. This might require quite a bit of reworking of the fingerprinting code.
Thanks !! Although my initial plan is not fingerprint the streaming music, just recognizing it. So im assuming that is the method read inside recog can loop between T (T being the time we want to listen to) just in the way that microphone is doing it.
I will write a small proposal with source code, at the beggining with a little delay, for example:
connect to Stream, download T seconds , save file , call the recognize function.
Great. When you get a proposal together, please open a PR.
Hi, i really love your work, i was wondering one thing. If we could read a raw input like you do with pyaudio, but instead from the Microphone we could add network streams, let say for example that we have something like this:
In which i can save the output of the stream directly to the hardrive instead of a file. Have any plans for something like this?