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.
Metadata
Release files for erting 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| erting-0.1.1.tar.gz | 17.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| erting-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.6 kB
Release files / erting-0.1.1.tar.gz
| Download URL | erting-0.1.1.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c5358509fad8ef266dda22a9146da7308a41250c6112438ffb869fc1376f8a0
|
|
BLAKE2b-256 checksum How to use checksums |
cea9d4933a5be4f97759cdc1d8b464c186ef264fccad4a75139564d055a7d236
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / erting-0.1.1-py3-none-any.whl
| Download URL | erting-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f4d6a995ea926b945581a9787613dd2cb2c812918a69934ff006f4c2cbfabd7
|
|
BLAKE2b-256 checksum How to use checksums |
9ca668c58f56c2bbe3374e2a386cd58e115e562183e2b0f677870e07343a77dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for erting 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.