Skip to main content

Audio steganography methods, attacks, and speech-quality evaluation metrics.

Project description

The A-Files

  _______ _                                   ______ _ _           
 |__   __| |                 /\              |  ____(_) |          
    | |  | |__   ___        /  \     ______  | |__   _| | ___  ___ 
    | |  | '_ \ / _ \      / /\ \   |______| |  __| | | |/ _ \/ __|
    | |  | | | |  __/     / ____ \           | |    | | |  __/\__ \
    |_|  |_| |_|\___|    /_/    \_\          |_|    |_|_|\___||___/
                                                                    

The A-Files is a powerful audio steganography software that allows users to embed secret data within an audio signal, measure speech quality metrics, and test the audio signal's robustness against different types of attacks.

With The A-Files, users can ensure that their sensitive information remains private and protected.

Table of contents

About

The A-Files project contains:

  • Audio watermarking methods
  • Speech quality metrics
  • Audio attacks
The A-Files functions
Loading

The A-Files is an audio steganography software that allows users to hide secret data within an audio signal. To do this, users can load both the audio file and the data they want to hide into the software. The A-Files supports several types of audio files, such as WAV or FLAC. Once the audio file and the secret data are loaded, the software can embed the data within the audio signal.

Capacity

The A-Files offers several techniques for embedding secret data within an audio signal, such as LSB (Least Significant Bit) insertion, phase coding, and echo hiding. Each technique has its own strengths and weaknesses, and users can choose the technique that best fits their application's requirements.

Transparency

The A-Files includes tools for measuring speech quality metrics, such as PESQ (Perceptual Evaluation of Speech Quality), SNR (Signal-to-Noise Ratio) and STOI (Short-time objective intelligibility) metric. By measuring these metrics, users can ensure that the audio signal has not been degraded during the process of embedding secret data.

Robustness

The A-Files provides tools for testing the audio signal's robustness against different types of attacks. Attackers may attempt to remove the hidden data or alter the audio signal to render the hidden data useless. The A-Files includes tools for testing the audio signal's robustness against various types of attacks, such as noising, frequency cutting, and filtering. By testing the audio signal's robustness, users can determine the effectiveness of the audio steganography technique and make any necessary adjustments to improve the technique's strength and resilience.

Powered by some great GitHub repositories

Package structure

The canonical Python package now lives under src/taf/.

Repository layout:

  • src/taf/ contains the importable library code.
  • src/taf/resources/ contains packaged resources such as example audio, bundled sample datasets, and shipped model files.
  • tests/ contains import- and behavior-level tests.
  • Documentation/ remains outside the package as a project asset.

For local development, install the package in editable mode:

python -m pip install -e .[dev]

Publishing

Packaging and release instructions are in docs/publishing.md. The PyPI distribution name is the-a-files; the import package remains taf.

SRMRpy is vendored under src/srmrpy/ because it is required by the SRMR metric and is not published as a standard PyPI dependency.

Packaged resources

Runtime assets that must work from source, tests, editable installs, and built distributions live under src/taf/resources/.

Use this layout:

  • src/taf/resources/audio/ for standalone example WAV files.
  • src/taf/resources/datasets/ for the bundled VCTK and LibriSpeech sample corpora used by the smoke workflow.
  • src/taf/resources/models/ for packaged model weights such as .h5.

Example usage:

from taf.models.WavFile import WavFile
from taf.resources.paths import example_wav_path, mosnet_model_path, packaged_dataset_audio_paths

with example_wav_path() as wav_path:
    wav_file = WavFile.load(wav_path)

with mosnet_model_path() as model_path:
    print(model_path)

with packaged_dataset_audio_paths() as dataset_paths:
    print(len(dataset_paths["vctk"]))

Migration note

The main packaging change is the introduction of a src/ layout so the core library is imported as taf instead of relying on the repository root being on PYTHONPATH.

The implementation modules were copied into src/taf/ with their existing internal layout preserved to avoid algorithm changes. The legacy top-level TAF/ tree was left in place for now because a direct filesystem move was blocked on this checkout, so the new canonical code lives in src/taf/ and future work should target that package.

Steganography algorithms

List of implemented methods:

Class name Description [Reference]
LsbMethod.py Standard LSB coding [1]
EchoMethod.py Echo Hiding technique with single echo kernel [1]
PhaseCodingMethod.py Phase coding technique [1]
ImprovedPhaseCodingMethod.py Improved Phase Coding technique [19]
DctDeltaLsbMethod.py DCT Delta LSB [1]
DwtLsbMethod.py DWT LSB based [1]
DctB1Method.py First band of DCT coefficients (DCT-b1) [2]
PatchworkMultilayerMethod.py Patchwork-Based multilayer [3]
NormSpaceMethod.py Norm space method [4]
FsvcMethod.py Frequency Singular Value Coefficient Modification (FSVC) [5]
DsssMethod.py Direct Sequence Spread Spectrum technique [6]
BlindSvdMethod.py Blind SVD-based using entropy and log-polar transformation method [20]
PrimeFactorInterpolatedMethod.py Prime Factor Interpolated method [21]
LwtMethod.py LWT method [22]
ForegroundBackgroundSegmentationMethod.py Foreground-Background Segmentation LSB (FBS-LSB) [23]
FgasMethod.py Fixed-decoder network with adversarial perturbation generation (FGAS) [24]
AacStcMethod.py Adaptive +-1 LSB via AAC perceptual residual and Syndrome-Trellis Codes [25]

Each method extend abstract class SteganographyMethod

from abc import abstractmethod, ABC
from typing import List
import numpy as np


class SteganographyMethod(ABC):

    @abstractmethod
    def encode(self, data: np.ndarray, message: List[int]) -> np.ndarray:
        ...

    @abstractmethod
    def decode(self, data_with_watermark: np.ndarray, watermark_length: int) -> List[int]:
        ...

    @abstractmethod
    def type(self) -> str:
        ...

Metrics

AI Based

  • MOSNet: Deep Learning based Objective Assessment for Voice Conversion [16]

Speech Reverberation

  • Bark spectral distortion (BSD) [7]
  • Speech-to-reverberation modulation energy ratio (SRMR) [10]

Speech Intelligibility

  • Coherence and speech intelligibility index (CSII) [7]
  • Normalized-covariance measure (NCM) [7]
  • Short-time objective intelligibility (STOI) [9]

Speech Quality

  • Signal - to - Noise Ratio (SNR) [12]
  • Mel-cepstral distance measure for objective speech quality assessment [11]
  • Segmental Signal-to-Noise Ratio (SNRseg) [7]
  • Frequency-weighted Segmental SNR (fwSNRseg) [7]
  • Cepstrum Distance Objective Speech Quality Measure (CD) [7]
  • Log - likelihood Ratio (LLR) [7]
  • Weighted Spectral Slope (WSS) [7]
  • Perceptual Evaluation of Speech Quality (PESQ) [8]
  • Speech Enhancement Metrics (Csig, Covl, Cbak, Composite) [13]
  • Weighted Spectro-Temporal Modulation Index (wSTMI) [14]
  • Spectro-Temporal Glimpsing Index (STGI) [15]
  • Scale-invariant SDR(SISDR) [17]
  • BSSEval v4 [18]

Each metric extend abstract class Metric

from abc import ABC, abstractmethod
from numbers import Number

import numpy as np


class Metric(ABC):

    @abstractmethod
    def calculate(self,
                  samples_original: np.ndarray,
                  samples_processed: np.ndarray,
                  fs: int,
                  frame_len: float = 0.03,
                  overlap: float = 0.75) -> Number | np.ndarray:
        ...

    @abstractmethod
    def name(self) -> str:
        ...

Attacks

List of attack on audio samples:

  • Low pass filter
  • Additive noise
  • Frequency filter
  • Flip random samples
  • Cut random samples
  • Resample (downsampling, upsampling)
  • Amplitude scaling
  • Pitch shift
  • Time stretch

References

Articles

[1] Alsabhany, Ahmed A., Ahmed Hussain Ali, Farida Ridzuan, A. H. Azni, and Mohd Rosmadi Mokhtar. Digital Audio Steganography: Systematic Review, Classification, and Analysis of the Current State of the Art. Computer Science Review 38 (2020): 100316. https://doi.org/10.1016/j.cosrev.2020.100316
[2] Hu, Hwai Tsu, and Ling Yuan Hsu. Robust, Transparent and High-Capacity Audio Watermarking in DCT Domain. Signal Processing 109 (2015): 226–35. https://doi.org/10.1016/j.sigpro.2014.11.011
[3] Natgunanathan, Iynkaran, Yong Xiang, Guang Hua, Gleb Beliakov, and John Yearwood. Patchwork-Based Multilayer Audio Watermarking. IEEE/ACM Transactions on Audio Speech and Language Processing 25, no. 11 (2017): 2176–87. https://doi.org/10.1109/TASLP.2017.2749001
[4] Saadi, Slami, Ahmed Merrad, and Ali Benziane. Novel Secured Scheme for Blind Audio/Speech Norm-Space Watermarking by Arnold Algorithm. Signal Processing 154 (2019): 74–86. https://doi.org/10.1016/j.sigpro.2018.08.011
[5] Zhao, Juan, Tianrui Zong, Yong Xiang, Longxiang Gao, Wanlei Zhou, and Gleb Beliakov. Desynchronization Attacks Resilient Watermarking Method Based on Frequency Singular Value Coefficient Modification. IEEE/ACM Transactions on Audio Speech and Language Processing 29 (2021): 2282–95. https://doi.org/10.1109/TASLP.2021.3092555
[6] Nugraha, Rizky M. Implementation of Direct Sequence Spread Spectrum Steganography on Audio Data. Proceedings of the 2011 International Conference on Electrical Engineering and Informatics, ICEEI 2011, no. July ( 2011). https://doi.org/10.1109/ICEEI.2011.6021662
[7] Philipos C. Loizou. Speech Enhancement. Theory and Practice, Second Edition CRC Press ( 2013). https://doi.org/10.1201/b14529
[8] Miao Wang, Christoph Boeddeker, Rafael G. Dantas and ananda seelan. PESQ (Perceptual Evaluation of Speech Quality) Wrapper for Python Users Zenodo 2022. https://doi.org/10.5281/zenodo.6549559
[9] C.H.Taal, R.C.Hendriks, R.Heusdens, J.Jensen A Short-Time Objective Intelligibility Measure for Time-Frequency Weighted Noisy Speech, ICASSP 2010, Texas, Dallas. https://doi.org/10.1109/ICASSP.2010.5495701
[10] Tiago H. Falk, Chenxi Zheng, and Way-Yip Chan. A Non-Intrusive Quality and Intelligibility Measure of Reverberant and Dereverberated Speech, IEEE Trans Audio Speech Lang Process, Vol. 18, No. 7, pp. 1766-1774, Sept.2010. https://doi.org/10.1109/TASL.2010.2052247
[11] R. Kubichek, Mel-cepstral distance measure for objective speech quality assessment, Proceedings of IEEE Pacific Rim Conference on Communications Computers and Signal Processing, Victoria, BC, Canada, 1993, pp. 125-128 vol.1, https://doi.org/10.1109/PACRIM.1993.407206.
[12] https://en.wikipedia.org/wiki/Signal-to-noise_ratio
[13] Yi Hu and Philipos C. Loizou, Evaluation of Objective Quality Measures for Speech Enhancement, IEEE TRANSACTIONS ON AUDIO, SPEECH, AND LANGUAGE PROCESSING, VOL. 16, NO. 1, 229, JANUARY 2008, https://doi.org/10.1109/TASL.2007.911054
[14] A. Edraki, W.-Y. Chan, J. Jensen, & D. Fogerty, Speech Intelligibility Prediction Using Spectro-Temporal Modulation Analysis. IEEE/ACM Trans. Audio, Speech, & Language Processing, vol. 29, pp. 210-225, 2021, https://doi.org/10.1109/taslp.2020.3039929
[15] A. Edraki, W.-Y. Chan, J. Jensen, & D. Fogerty, A Spectro-Temporal Glimpsing Index (STGI) for Speech Intelligibility Prediction, Proc. Interspeech, 5 pages, Aug 2021, http://dx.doi.org/10.21437/Interspeech.2021-605
[16] Lo, Chen-Chou and Fu, Szu-Wei and Huang, Wen-Chin and Wang, Xin and Yamagishi, Junichi and Tsao, Yu and Wang, Hsin-Min, MOSNet: Deep Learning based Objective Assessment for Voice Conversion, arXiv preprint arXiv:1904.08352, 2019, https://arxiv.org/abs/1904.08352
[17] Roux, Jonathan Le and Wisdom, Scott and Erdogan, Hakan and Hershey, John R, SDR – Half-baked or Well Done?, ICASSP 2019 - 2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2019, https://dx.doi.org/10.1109/ICASSP.2019.8683855
[18] Stöter, Fabian-Robert and Liutkus, Antoine and Ito, Nobutaka, The 2018 Signal Separation Evaluation Campaign, Latent Variable Analysis and Signal Separation: 14th International Conference, LVA/ICA 2018, Surrey, UK, 2018, pp. 293–305, https://doi.org/10.5281/zenodo.3376621
[19] Yang, Guang, An Improved Phase Coding Audio Steganography Algorithm,arXiv preprint arXiv:2408.13277, 2024, https://doi.org/10.48550/arXiv.2408.13277
[20] Dhar, Pranab Kumar, and Shimamura, Tetsuya, Blind SVD-based audio watermarking using entropy and log-polar transformation, Journal of Information Security and Applications, Volume 20, 2015, Pages 74-83, https://doi.org/10.1016/j.jisa.2014.10.007.
[21] Adhiyaksa, F. A., Ahmad, T., Shiddiqi, A. M., Jati Santoso, B., Studiawan, H., & Pratomo, B. A. (2022). Reversible Audio Steganography using Least Prime Factor and Audio Interpolation. In 2021 International Seminar on Machine Learning, Optimization, and Data Science (ISMODE) (pp. 97–102). IEEE. https://doi.org/10.1109/ISMODE53584.2022.9743066
[22] Mushtaq, S., Mehraj, S., & Parah, S. A. (2024). Blind and Robust Watermarking Framework for Audio Signals. In 2024 11th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions) ( ICRITO) (pp. 1–5). IEEE. https://doi.org/10.1109/ICRITO61523.2024.10522195
[23] Wang, J., & Wang, K. (2025). A novel audio steganography based on the segmentation of the foreground and background of audio. Computers & Electrical Engineering, 117, 109247. https://doi.org/10.1016/j.compeleceng.2024.109247
[24] Yan, J., Cheng, Y., Yin, Z., Zhang, X., Wang, S., Sun, T., & Jiang, X. (2025). FGAS: Fixed Decoder Network-Based Audio Steganography with Adversarial Perturbation Generation. arXiv preprint arXiv:2505.22266. https://arxiv.org/abs/2505.22266
[25] Luo, W., Zhang, Y., & Li, H. (2017). Adaptive Audio Steganography Based on Advanced Audio Coding and Syndrome-Trellis Coding. In C. Kraetzer et al. (Eds.), Digital Forensics and Watermarking, IWDW 2017, Lecture Notes in Computer Science, vol 10431, pp. 177-186. Springer. https://doi.org/10.1007/978-3-319-64185-0_14
[26] Yan, Y., Li, Y., Xiao, Q., & Ren, Y. (2026). PRoADS: Provably Secure and Robust Audio Diffusion Steganography with Latent Optimization and Backward Euler Inversion. arXiv preprint arXiv:2603.10314 (ICASSP 2026). https://arxiv.org/abs/2603.10314

Links

[1] https://github.com/kosta-pmf/audio-watermarking
[2] https://github.com/ktekeli/audio-steganography-algorithms
[3] https://github.com/schmiph2/pysepm
[4] https://github.com/ludlows/PESQ
[5] https://github.com/mpariente/pystoi
[6] https://github.com/jfsantos/SRMRpy
[7] https://github.com/jasminsternkopf/mel_cepstral_distance
[8] https://github.com/nglehuy/semetrics
[9] https://github.com/aminEdraki/py-intelligibility
[10] https://github.com/aliutkus/speechmetrics
[11] https://github.com/sigsep/sigsep-mus-eval

Licence

The A-Files is an open source software under GPLv3 license.

Dependencies

PESQ requires Microsoft Visual C++ 14.0 or later. You can install it via Microsoft C++ Build Tools: https://visualstudio.microsoft.com/visual-cpp-build-tools/

In some cases, you may also need FFmpeg: https://ffmpeg.org/

Authors

  • Paweł Kaczmarek (@pawel-kaczmarek) - Military University of Technology, Faculty of Electronics
  • Zbigniew Piotrowski - Military University of Technology, Faculty of Electronics

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

the_a_files-0.1.0.tar.gz (18.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

the_a_files-0.1.0-py3-none-any.whl (18.7 MB view details)

Uploaded Python 3

File details

Details for the file the_a_files-0.1.0.tar.gz.

File metadata

  • Download URL: the_a_files-0.1.0.tar.gz
  • Upload date:
  • Size: 18.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for the_a_files-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a3f0ca5b1d6123158100f2533f7a5cebb5572cb263e014166a3b37cb01d9dd03
MD5 157ff67fc442bde2d6c8f2667b75b22e
BLAKE2b-256 712e21dd98f1d6eba109ac7d47d1d5ee875d14745d0a95709848d6a700496278

See more details on using hashes here.

Provenance

The following attestation bundles were made for the_a_files-0.1.0.tar.gz:

Publisher: ci.yml on pawel-kaczmarek/The-A-Files

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file the_a_files-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: the_a_files-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for the_a_files-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c88bb661f82b417b6d92b95c84db920864eb6cef0003962c61d87b1ec0850628
MD5 62a3478218244162af029a798e076ce3
BLAKE2b-256 8e30ee5847250b09747d1b716ddd2ad191a5e454bd0c6d933a4236320f1d1eb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for the_a_files-0.1.0-py3-none-any.whl:

Publisher: ci.yml on pawel-kaczmarek/The-A-Files

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page