Skip to main content

AI-powered audio/video denoising tool with CLI, GUI, and web interface

Project description

ErTing - AI-Powered Audio/Video Denoising

A powerful, local-first audio/video denoising tool powered by AI. ErTing uses ModelScope's speech enhancement models to remove noise from your audio and video files, delivering clean, professional-quality output.

ErTing (耳听) -- Hear clearly.

Features

Three Interfaces

  • CLI - Full-featured command-line interface with unified flags
  • GUI - Desktop Tkinter interface for easy point-and-click operation
  • Web - Flask-based web interface for browser-based denoising

Core Capabilities

  • AI-powered noise suppression using ModelScope models
  • Supports wide range of audio/video formats (MP3, WAV, MP4, AVI, MOV, M4A, FLAC, OGG, WMA, AAC)
  • Automatic format conversion to 16kHz WAV for optimal processing
  • Configurable output paths and model selection
  • JSON output for automation workflows

Requirements

  • Python 3.10+
  • ModelScope package
  • pydub for audio format conversion
  • 2GB+ RAM recommended for model loading

Installation

Method 1: Install from PyPI

pip install erting

Method 2: Install from Source

git clone https://github.com/cycleuser/ErTing.git
cd ErTing
pip install -e .

Quick Start

CLI Usage

# Basic denoising
erting input.mp3

# Specify output path
erting -o output_clean.wav input.mp3

# JSON output for scripting
erting --json input.mp3

# Verbose mode
erting -v input.mp3

# Quiet mode (minimal output)
erting -q input.mp3

GUI Usage

erting-gui

Web Interface

erting-web

Then open http://localhost:5001 in your browser.

CLI Options

erting [-V] [-v] [-o PATH] [--json] [-q] input [options]

Positional Arguments:
  input                  Input audio/video file path

Options:
  -V, --version         Show version and exit
  -v, --verbose         Enable verbose output
  -o, --output PATH     Output file path
  --json                Output result as JSON
  -q, --quiet           Suppress non-essential output
  --model MODEL         ModelScope model name (default: iic/speech_zipenhancer_ans_multiloss_16k_base)

Python API

from erting.api import denoise_audio, ToolResult

result = denoise_audio(input_path="input.mp3")
print(result.success)    # True / False
print(result.data)      # {'input_path': ..., 'output_path': ...}
print(result.metadata)  # {'version': '0.1.0', 'model': ...}

Agent Integration (OpenAI Function Calling)

ErTing exposes OpenAI-compatible tools for LLM agents:

from erting.tools import TOOLS, dispatch

# Pass TOOLS to the OpenAI chat completion API
response = client.chat.completions.create(
    model="gpt-4o",
    messages=messages,
    tools=TOOLS,
)

# Dispatch the tool call
result = dispatch(
    tool_call.function.name,
    tool_call.function.arguments,
)

Supported Formats

Format Extension Notes
WAV .wav Direct processing
MP3 .mp3 Direct processing
MP4 .mp4 Audio extracted
AVI .avi Audio extracted
MOV .mov Audio extracted
M4A .m4a Direct processing
FLAC .flac Direct processing
OGG .ogg Direct processing
WMA .wma Direct processing
AAC .aac Direct processing

Project Structure

ErTing/
├── pyproject.toml              # Package metadata & build config
├── README.md                   # This file
├── LICENSE                     # GPL-3.0-or-later
├── erting/
│   ├── __init__.py             # Package init
│   ├── __version__.py          # Version
│   ├── __main__.py             # python -m erting entry
│   ├── core.py                 # Audio processing engine
│   ├── cli.py                  # CLI with unified flags
│   ├── gui.py                  # Tkinter GUI
│   ├── web.py                  # Flask web app
│   ├── api.py                  # ToolResult API
│   ├── tools.py                # OpenAI function-calling tools
│   └── templates/
│       └── index.html           # Web UI template
├── tests/
│   ├── __init__.py
│   ├── conftest.py             # Test fixtures
│   ├── test_core.py            # Core module tests
│   ├── test_api.py              # API tests
│   ├── test_tools.py           # Tools schema tests
│   └── test_cli.py             # CLI integration tests
└── scripts/
    ├── publish.sh               # PyPI publish script
    └── publish.bat              # Windows publish script

Testing

# Run all tests
python -m pytest tests/ -v

# Run specific test file
python -m pytest tests/test_api.py -v

# Run with coverage
python -m pytest tests/ --cov=erting --cov-report=term-missing

Publishing to PyPI

# Linux/macOS
./scripts/publish.sh

# Windows
scripts\publish.bat

Or manually:

rm -rf dist/
python -m build
twine upload dist/*

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
python -m pytest tests/ -v

# Format code
ruff format .

# Lint
ruff check .

# Type check
mypy erting/

License

GPL-3.0-or-later. See LICENSE for details.

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

erting-0.1.1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

erting-0.1.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file erting-0.1.1.tar.gz.

File metadata

  • Download URL: erting-0.1.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for erting-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8c5358509fad8ef266dda22a9146da7308a41250c6112438ffb869fc1376f8a0
MD5 e6708f3fec0b792c19319250259b3767
BLAKE2b-256 cea9d4933a5be4f97759cdc1d8b464c186ef264fccad4a75139564d055a7d236

See more details on using hashes here.

File details

Details for the file erting-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: erting-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for erting-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f4d6a995ea926b945581a9787613dd2cb2c812918a69934ff006f4c2cbfabd7
MD5 6ef21e7bdaae6ee6aa3570b2af575873
BLAKE2b-256 9ca668c58f56c2bbe3374e2a386cd58e115e562183e2b0f677870e07343a77dc

See more details on using hashes here.

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