dpwe / audfprint

Landmark-based audio fingerprinting
MIT License
536 stars 121 forks source link

Multiple input and adding live audio option #76

Closed asimejaz14 closed 4 years ago

asimejaz14 commented 4 years ago

Hey man, I've been using this for few days. Works all good but I have few issues,

1- Is there a way to add multiple input files like a list to match audios in our database? currently I can only give one input audio as an argument.

2- Is there a way to convert it to simple input output python program without using command line arguments? Its so frustrating sometimes to write complete command again and again

3- Is there a way to add live audio capture like matching live radio for our ads already stored in database?

dpwe commented 4 years ago

1- Is there a way to add multiple input files like a list to match audios in our database? currently I can only give one input audio as an argument.

Yes, with the --list option, each input file is treated as a list of paths to wav files, one per line.

2- Is there a way to convert it to simple input output python program without using command line arguments? Its so frustrating sometimes to write complete command again and again

You can edit the declaration of the command line flags in the USAGE variable (i.e., https://github.com/dpwe/audfprint/blob/master/audfprint.py#L354 and onwards) to have the defaults you want to use instead of having to specify them. I use the docopts package which actually parses the USAGE message to figure out what the acceptable flags are, and their default values (occur in square brackets at the end of the line describing each flag).

3- Is there a way to add live audio capture like matching live radio for our ads already stored in database?

That would be a lot more involved. The matching is intrinsically batch mode; you'd need to set up a job to capture, e.g., 1 min clips of the live input, then save them to disk and pass them to the query system.

DAn.

asimejaz14 commented 4 years ago

Thanks bro! List option worked perfect and I was successfully able to input multiple files as input. :+1:

Also, thanks for ques 2 and 3 as well. I will look into it.

dpwe commented 4 years ago

Specifying multiple audio files on the command line should work. Separate them with a space, and don't use commas.

DAn.

On Tue, Feb 18, 2020 at 6:43 AM asimejaz14 notifications@github.com wrote:

@dpwe https://github.com/dpwe About your answer to question 1 Can you please specify the syntax of giving multiple input audios.

Right now, I do this

match --dbase ads_database.pklz audio_1.mp3 --find-time-range --maxtimebits 18

But I want something like this,

match --dbase ads_database.pklz aduio_1.mp3, audio_2.mp3, audio_3.mp3 --find-time-range --maxtimebits 18

I hope this makes sense.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dpwe/audfprint/issues/76?email_source=notifications&email_token=AAEGZUNUJ3SHOPX7XBBKKRDRDPCUBA5CNFSM4KWUCECKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMBVJZY#issuecomment-587420903, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEGZUNIHJ6UC3O3PX3I4STRDPCUBANCNFSM4KWUCECA .