Coder Social home page Coder Social logo

eldr-io / audiocate Goto Github PK

View Code? Open in Web Editor NEW
9.0 0.0 0.0 224.04 MB

Audio encoding authentication and validation library for verifying audio as being from a trusted source

Home Page: https://eldr-io.github.io

License: Other

Haskell 56.78% C 42.07% Shell 0.49% Makefile 0.66%
audio-embedding audio-processing audio-steganography cryptography sound artifical-intelligence

audiocate's Introduction

audiocate

Haskell Haskell CI Code Coverage

Audio encoding authentication library for verifying audio as being from a trusted source.

Description

The purpose of audiocate is to embed meaningful payloads into audio that will allow a decoder to verify that the payload came from a trusted source. The primary motivation is to combat the rising misuse of audio deepfakes generated by modern Artificial Intelligence (AI). For this, it makes use of the TOTP (Time-based One Time Password) algorithm to introduce a time-horizon into the algorithm. This concept is at the heart of audiocate, which in the encoding stage repeatedly encodes binary data into chunks of audio input. The binary data consists of two parts, one representing the timestamp of the current system time (in the form of an unsigned 64-bit integer representing POSIX seconds since an epoch), followed by the result of calculating the TOTP value using the current time alongside a secret key and validity time window. In the decoding stage, the algorithm repeatedly reads the binary representation of an encoded timestamp and result code, and then calculates its own result code using a secret key and validity time window before assessing if the chunk of audio was successfully decoded by comparing the two result codes.

Audiocate currently uses Least Significant Bit (LSB) encoding, but its modular nature allows for future support for Echo Hiding. The imperceptibility of audiocate is high as it encodes very minimal payloads into audio, as shown in the comparison spectrogram showing the difference between a raw audio and the audiocate encoded spectrogram:

spectroDiff

Example use-case

A mobile phone carrier may want to implement audiocate using its composable real-time streaming functionality, so that audiocate sits on either side of the call, encoding chunks on one end and decoding them on the other:

cellNoText

Executables

Audiocate is a library at its core, but exposes a CLI and a simple GUI (written using GTK) for interaction with the library.

gui

How to

Build all

Builds all of the audiocate artifacts for the current operating system.

make build-all

Generate docs

Generates the haddock documentation for the audiocate-library and places it in /docs.

make generate-docs

Run tests

Builds and runs all of the unit and integration tests of the project. The test/corpus/ directory holds fourteen sample .WAVE files used for testing, which represent different audio samples of real recordings and AI generated deepfakes.

make run-test

Run benchmarks

Note: this is a long-running process. Use the pattern benchmark target below to target specific sample files for benchmarking.

make benchmark-test

Run benchmarks with pattern:

make pattern=stream benchmark-pattern

Analyse spectrograms

After having run the integration tests, this target generates spectrogram images for each of the sample files and compares it to the original.

make analyse-spectograms

audiocate's People

Contributors

exojt avatar sigrdrifa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.