Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self Implementation #27

Open
AmirZandi13 opened this issue Dec 12, 2022 · 1 comment
Open

Self Implementation #27

AmirZandi13 opened this issue Dec 12, 2022 · 1 comment

Comments

@AmirZandi13
Copy link

Hi @swesterfeld.
Thanks again for your great package.
I have a problem with this approach. and it's about running a shell execution in my wrapper.
I have so many requests and I have to respond them below 0.5 milliseconds so preferably it's better to implement the logic of this package in my wrapper.
Could you please tell me about the logic of this package and what is going on behind the scenes of that?
And what sources did you use to implement that?

Thanks

@swesterfeld
Copy link
Owner

I don't think that shell execution is a big problem from a performance point of view. The reason is that watermarking itself is kind-of expensive. Also usually you'd have to re-encode the audio before you send it. So I'd expect to see most of the actual CPU time being spent on watermarking and compression (for instance mp3/aac encoding), and not so much in the shell execution (especially on Linux where spawning sub processes is quite fast). But I'd encourage you to measure the actual CPU usage for serving a typical request yourself.

Could you please tell me about the logic of this package and what is going on behind the scenes of that?

Well, adding "developer documentation" that describes details on how everything works is on my TODO, but I don't have time to do it right now. So I can only quote from the README:

Internally, audiowmark is using the patchwork algorithm to hide the data in the spectrum of the audio file. The signal is split into 1024 sample frames. For each frame, some pseoudo-randomly selected amplitudes of the frequency bands of a 1024-value FFTs are increased or decreased slightly, which can be detected later. The algorithm used here is inspired by

Martin Steinebach: Digitale Wasserzeichen für Audiodaten.
Darmstadt University of Technology 2004, ISBN 3-8322-2507-2

It is German though, an english short description of the patchwork algorithm by the same author is available here:

https://onlinelibrary.wiley.com/doi/epdf/10.1002/047134608X.W8281

but developing something like audiowmark from scratch is quite a lot of research / development you'd need to invest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants