Skip to main content

Voice Acoustic Analyzer - Professional audio metrics extraction

Project description

Audio Metrics CLI

๐ŸŽ™๏ธ Cross-platform audio analysis toolkit for speech metrics extraction

PyPI version Python 3.8+ License: MIT


๐Ÿš€ Quick Start

Installation

# Install from PyPI (recommended)
pip install audio-metrics-cli

# Or install from source (development)
git clone https://github.com/i-whimsy/audio-metrics-cli.git
cd audio-metrics-cli
pip install -e ".[dev]"

Basic Usage

# Analyze audio file
audio-metrics analyze your_audio.wav --output result.json

# With verbose output
audio-metrics analyze audio.mp3 --verbose --show-progress

# Transcribe only
audio-metrics transcribe audio.m4a -o transcript.txt

# Compare two audio files
audio-metrics compare v1.wav v2.wav

๐Ÿ“ฆ Features

Core Metrics

  • ๐ŸŽต Audio Information: Duration, sample rate, file size
  • ๐Ÿ—ฃ๏ธ Voice Activity Detection: Speech/silence segmentation
  • ๐Ÿ“ Speech-to-Text: Whisper-powered transcription
  • ๐ŸŽผ Prosody Analysis: Pitch, energy, speech rate
  • ๐Ÿ˜Š Emotion Recognition: Emotional state detection (optional)
  • ๐Ÿ”ค Filler Word Detection: "um", "uh", "like" detection

Supported Formats

  • โœ… WAV
  • โœ… MP3
  • โœ… M4A
  • โœ… FLAC
  • โœ… OGG

Cross-Platform

  • โœ… Windows
  • โœ… macOS
  • โœ… Linux

๐Ÿ“– Documentation

Command Line Interface

analyze - Full Analysis

audio-metrics analyze audio.wav [OPTIONS]

Options:
  -o, --output PATH        Output JSON file path
  -c, --config PATH        Configuration file
  -m, --model TEXT         Whisper model (tiny/base/small/medium/large)
  --no-emotion            Skip emotion analysis
  --show-progress         Show progress bars
  -v, --verbose           Verbose output
  --help                  Show this message

transcribe - Speech to Text

audio-metrics transcribe audio.wav [OPTIONS]

Options:
  -o, --output PATH       Output transcript file
  -m, --model TEXT        Whisper model
  --language TEXT         Language code
  --help                  Show this message

compare - Compare Audio Files

audio-metrics compare audio1.wav audio2.wav [OPTIONS]

Options:
  --format TEXT          Output format (text/json/markdown)
  --help                 Show this message

๐Ÿ“Š Output Example

{
  "audio_info": {
    "duration_seconds": 185.2,
    "sample_rate": 44100,
    "file_size_mb": 2.8
  },
  "vad_analysis": {
    "speech_ratio": 0.81,
    "pause_count": 23,
    "avg_pause_duration": 1.1
  },
  "speech_metrics": {
    "words_total": 820,
    "words_per_minute": 266
  },
  "prosody_metrics": {
    "pitch_mean_hz": 145.3,
    "energy_cv": 0.33
  },
  "filler_metrics": {
    "filler_word_count": 18,
    "fillers_per_100_words": 2.2
  }
}

๐Ÿ”ง Configuration

Create a config.json file:

{
  "models": {
    "speech_to_text": {
      "provider": "whisper",
      "model": "base",
      "device": "auto"
    },
    "vad": {
      "provider": "silero",
      "threshold": 0.5
    }
  },
  "audio_analysis": {
    "enable_pitch": true,
    "enable_energy": true,
    "enable_pause": true
  },
  "features": {
    "enable_emotion": true,
    "skip_if_too_long": 3600
  }
}

๐Ÿ’ป Development

Setup Development Environment

# Clone repository
git clone https://github.com/i-whimsy/audio-metrics-cli.git
cd audio-metrics-cli

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

# Run tests
pytest tests/

# Format code
black src/
ruff check src/

Project Structure

audio-metrics-cli/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ audio_metrics/
โ”‚       โ”œโ”€โ”€ cli.py              # CLI entry point
โ”‚       โ”œโ”€โ”€ config.py           # Configuration
โ”‚       โ””โ”€โ”€ modules/            # Core modules
โ”‚           โ”œโ”€โ”€ audio_loader.py
โ”‚           โ”œโ”€โ”€ vad_analyzer.py
โ”‚           โ”œโ”€โ”€ speech_to_text.py
โ”‚           โ”œโ”€โ”€ prosody_analyzer.py
โ”‚           โ”œโ”€โ”€ emotion_analyzer.py
โ”‚           โ”œโ”€โ”€ filler_detector.py
โ”‚           โ”œโ”€โ”€ metrics_builder.py
โ”‚           โ””โ”€โ”€ json_exporter.py
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ examples/
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ README.md

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments


๐Ÿ“ž Support


Built with โค๏ธ by OpenClaw Team

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

audio_metrics_cli-0.3.1.tar.gz (37.2 kB view details)

Uploaded Source

Built Distribution

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

audio_metrics_cli-0.3.1-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

Details for the file audio_metrics_cli-0.3.1.tar.gz.

File metadata

  • Download URL: audio_metrics_cli-0.3.1.tar.gz
  • Upload date:
  • Size: 37.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for audio_metrics_cli-0.3.1.tar.gz
Algorithm Hash digest
SHA256 031362a5feef0251ea2f259c6fdb9f6c2f0becc6b2a40fb1083b08e821994e3c
MD5 30353eefe31ceb66c212860381b72947
BLAKE2b-256 db16c576d594bcffedbabaf8a8ad83e59d6ef28a323ca94c5be537e84c3bc7ff

See more details on using hashes here.

File details

Details for the file audio_metrics_cli-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for audio_metrics_cli-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ca5a64d24586b3d38cf2946dcbe648f804c50355a39dc7f315486fbecd65680
MD5 da9958bdec6a6ccb65c2e55144dcb3c8
BLAKE2b-256 b1115713a3c92a37aaa9f6e0d1ba1ae91e25da53ee2c267177a8c73870040b6b

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