Skip to content

4equest/nemui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nemui-sound

音声ステガノグラフィのようなものの実装ライブラリおよび CLI ツール。

概要

このプロジェクトは、音声信号に別の音声情報を埋め込むステガノグラフィ技術のようなものを提供します。

インストール

uv を使用して依存関係をインストールし、パッケージをセットアップします。

uv sync

使用方法

インストール後、uv run nemui コマンドを使用して埋め込みおよび抽出を実行できます。

基本コマンド

uv run nemui <input_file> --output <output_dir>

引数

  • input_file: 埋め込み対象となる入力音声ファイル(WAV 形式)。
  • --output: 出力ディレクトリのパス。
  • --cover: カバー音声として使用する音声ファイルのパス。指定しない場合はノイズが生成されます。カバー音声が短い場合は自動的にループされます。
  • --n-fft: STFTのウィンドウサイズ(デフォルト: 2048)。
  • --hop-length: STFTのホップサイズ(デフォルト: 512)。

実行例

uv run nemui input.wav --output output_dir

実装手法

ターゲット信号の周波数特性に基づいて、ステレオ空間上でのパンニング(Center/Side)を制御します。 モノラルにミックスダウンした際に、Side 成分(逆位相)が打ち消され、Center 成分のみが抽出される仕組みを利用しています。

デモ

状態 スペクトログラム 音声
Original (入力) 再生
Stego (埋め込み後) 再生
Extracted (抽出後) 再生

依存関係

  • Python 3.12 以上
  • numpy
  • scipy
  • soundfile
  • librosa

nemui-sound (English)

Audio steganography implementation library and CLI tool.

Overview

This project provides steganography techniques to embed audio information into another audio signal.

Installation

Use uv to install dependencies and setup the package.

uv sync

Usage

After installation, use the uv run nemui command to perform embedding and extraction.

Basic Command

uv run nemui <input_file> --output <output_dir>

Arguments

  • input_file: Input audio file to be embedded (WAV format).
  • --output: Path to the output directory.
  • --cover: Path to an audio file to use as a cover (carrier). If not specified, noise is generated. The cover audio will loop automatically if it is shorter than the input.
  • --n-fft: STFT window size (default: 2048).
  • --hop-length: STFT hop length (default: 512).

Examples

# Run with a cover audio
uv run nemui input.wav --cover cover.wav --output output_dir

Implementation Methods

Spectral Panning

Controls panning (Center/Side) in the stereo space based on the frequency characteristics of the target signal. When mixed down to mono, the Side components (out-of-phase) are canceled out, leaving only the Center components to be extracted.

Demo

State Spectrogram Audio
Original (Input) Play
Stego (Embedded) Play
Extracted Play

Dependencies

  • Python 3.12 or higher
  • numpy
  • scipy
  • soundfile
  • librosa

About

OOPS的な何か。スピーカーの左右を向かい合わせにすると音が聞こえるようになるノイズを生成します。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors