Add Support for Processing Tone Detection Against a Static Audio File via Command Line
Hey, it would be super awesome if you could use cli flags to pass a file and get a json response like the webhook!
@MaxwellDPS I am not sure what you mean. Can you provide an example?
I suspect that he's after the same thing I am.
I'd like to be able to feed this individual files (from trunk-recorder/etc), and get a webhook-style response back saying if it contained tones or not, and if so, which department/etc they match.
For my use-case, it would ideally be a web API in the app itself, but CLI could also work. Basically hit the API with the audio file and a configuration object with the 'detectors' configuration (so that the app itself doesn't need to have those configs hardcoded; this lets me use the same instance of fd-tone-notify to handle a bunch of different systems that may have the same tones defined), and get a response similar to what is sent for the webhook right now.
I'd handle notifications myself, and wouldn't want to record - but I could see a use case where someone would also want to be able to pass in the notification configuration, and have notifications sent from fd-tone-notify too.
@natecarlson So to clarify, you are requesting the ability to run the detection logic against an arbitrary file instead of processing a live stream of audio?
So something like this?
fdtonenotify get-tones --audio path/to/30min-audio-chunck.wav --config path/to/config.json
Output:
Tone ABC at 1:22
Tone DEF at 12:54
Tone XYZ at 24:19
@natecarlson So to clarify, you are requesting the ability to run the detection logic against an arbitrary file instead of processing a live stream of audio?
Yes.. I don't know if multiple tone detection would be necessary; for my purposes it would not.. I'd be running it against files that each contain individual transmissions.
For me: API where you could upload a file and have FDNotify process it and do it's thing. For me this would be pretty universal and anyone could use it.
If not then yeah being able to run a command and point it to the file to run from. Would need to work in both linux and windows so everyone could use it.