Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- name: Type check with mypy
run: |
mypy ai_audio_detector/ --ignore-missing-imports
mypy aiaa/ --ignore-missing-imports

- name: Test with pytest
run: |
Expand Down Expand Up @@ -265,8 +265,8 @@ jobs:
if [ -n "${{ secrets.TEST_PYPI_API_TOKEN }}" ]; then
echo "Testing installation from Test PyPI..."
sleep 30 # Wait for package to be available
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ ai-audio-detector==${{ steps.version.outputs.version }} || echo "⚠️ Test PyPI installation failed (package may not exist yet)"
python -c "import ai_audio_detector; print('✅ Package installed successfully from Test PyPI')" || echo "⚠️ Package import failed"
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ aiaa==${{ steps.version.outputs.version }} || echo "⚠️ Test PyPI installation failed (package may not exist yet)"
python -c "import aiaa; print('✅ Package installed successfully from Test PyPI')" || echo "⚠️ Package import failed"
else
echo "⚠️ Skipping Test PyPI installation test (no token)"
fi
Expand All @@ -285,29 +285,29 @@ jobs:
- name: Create GitHub Release
run: |
# Create a zip of the dist folder
cd dist && zip -r ../ai-audio-detector-${{ steps.version.outputs.version }}-dist.zip . && cd ..
cd dist && zip -r ../aiaa-${{ steps.version.outputs.version }}-dist.zip . && cd ..

# Create the release using GitHub CLI
gh release create ${{ steps.version.outputs.tag }} \
--title "Release ${{ steps.version.outputs.tag }}" \
--notes "## AI Audio Detector ${{ steps.version.outputs.version }}
--notes "## AIAA: AI Audio Authenticity ${{ steps.version.outputs.version }}

🎉 **New Release Available on PyPI!**

### Installation
\`\`\`bash
pip install ai-audio-detector==${{ steps.version.outputs.version }}
pip install aiaa==${{ steps.version.outputs.version }}
\`\`\`

### What's New
- See [CHANGELOG.md](https://github.com/ajprice16/AI_Audio_Detection/blob/main/CHANGELOG.md) for details

### Package Information
- **PyPI**: https://pypi.org/project/ai-audio-detector/${{ steps.version.outputs.version }}/
- **Test PyPI**: https://test.pypi.org/project/ai-audio-detector/${{ steps.version.outputs.version }}/
- **PyPI**: https://pypi.org/project/aiaa/${{ steps.version.outputs.version }}/
- **Test PyPI**: https://test.pypi.org/project/aiaa/${{ steps.version.outputs.version }}/

### Verification
All tests, security scans, and quality checks have passed ✅" \
ai-audio-detector-${{ steps.version.outputs.version }}-dist.zip
aiaa-${{ steps.version.outputs.version }}-dist.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed
- Rebranded package from "ai-audio-detector" to "aiaa" (AIAA: AI Audio Authenticity)
- Updated all documentation, examples, and code references to reflect new branding
- Changed console command from `ai-audio-detector` to `aiaa`
- Updated model filename from `ai_audio_detector.joblib` to `aiaa.joblib`

## [1.1.0] - 2025-8-1

### Added
Expand Down
30 changes: 15 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to AI Audio Detector
# Contributing to AIAA: AI Audio Authenticity

Thank you for your interest in contributing to the AI Audio Detector! This document provides guidelines and information for contributors.
Thank you for your interest in contributing to AIAA: AI Audio Authenticity! This document provides guidelines and information for contributors.

## Table of Contents

Expand All @@ -21,8 +21,8 @@ This project adheres to a code of conduct. By participating, you are expected to
1. **Fork the repository** on GitHub
2. **Clone your fork** locally:
```bash
git clone https://github.com/yourusername/ai-audio-detector.git
cd ai-audio-detector
git clone https://github.com/yourusername/AI_Audio_Detection.git
cd AI_Audio_Detection
```
3. **Create a branch** for your feature or bug fix:
```bash
Expand Down Expand Up @@ -73,8 +73,8 @@ Good pull requests include:

1. **Clone the repository**:
```bash
git clone https://github.com/yourusername/ai-audio-detector.git
cd ai-audio-detector
git clone https://github.com/yourusername/AI_Audio_Detection.git
cd AI_Audio_Detection
```

2. **Create a virtual environment**:
Expand All @@ -97,8 +97,8 @@ Good pull requests include:
### Project Structure

```
ai-audio-detector/
├── ai_audio_detector.py # Main implementation
AI_Audio_Detection/
├── aiaa/ # Main package
├── example_usage.py # Usage examples
├── config.yaml # Configuration file
├── requirements.txt # Python dependencies
Expand All @@ -120,15 +120,15 @@ ai-audio-detector/
- Follow **PEP 8** style guidelines
- Use **Black** for code formatting:
```bash
black ai_audio_detector.py
black aiaa/
```
- Use **isort** for import sorting:
```bash
isort ai_audio_detector.py
isort aiaa/
```
- Use **flake8** for linting:
```bash
flake8 ai_audio_detector.py
flake8 aiaa/
```

### Documentation
Expand All @@ -153,16 +153,16 @@ ai-audio-detector/
```bash
# Run basic functionality tests
python -c "
from ai_audio_detector import AIAudioDetector
from aiaa import AIAudioDetector
detector = AIAudioDetector()
print('Tests passed')
"

# Run linting
flake8 ai_audio_detector.py
flake8 aiaa/

# Test imports
python -c "from ai_audio_detector import AIAudioDetector, AudioFeatureExtractor"
python -c "from aiaa import AIAudioDetector, AudioFeatureExtractor"
```

### Test Coverage
Expand Down Expand Up @@ -259,4 +259,4 @@ If you have questions about contributing:
2. **Create a new issue** for discussion
3. **Join the discussion** in existing issues

Thank you for contributing to AI Audio Detector!
Thank you for contributing to AIAA: AI Audio Authenticity!
8 changes: 4 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ include requirements-dev.txt
include config.yaml

# Include package data
recursive-include ai_audio_detector *.py
recursive-include ai_audio_detector *.yaml
recursive-include ai_audio_detector *.yml
recursive-include ai_audio_detector *.json
recursive-include aiaa *.py
recursive-include aiaa *.yaml
recursive-include aiaa *.yml
recursive-include aiaa *.json

# Include tests
recursive-include tests *.py
Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AI Audio Detector
# AIAA: AI Audio Authenticity

A machine learning system for detecting AI-generated audio using Benford's Law analysis and advanced audio feature extraction. The system employs ensemble learning with adaptive model updating capabilities.

Expand Down Expand Up @@ -26,7 +26,7 @@ A machine learning system for detecting AI-generated audio using Benford's Law a
### Option 1: Install from PyPI (Recommended)

```bash
pip install ai-audio-detector
pip install aiaa
```

### Option 2: Install from Source
Expand Down Expand Up @@ -66,16 +66,16 @@ brew install libsndfile ffmpeg

**If installed from PyPI:**
```bash
ai-audio-detector --interactive
aiaa --interactive
# or
ai-audio-detector --predict-file path/to/audio.wav
aiaa --predict-file path/to/audio.wav
```

**If running from source:**
```bash
python -m ai_audio_detector --interactive
python -m aiaa --interactive
# or
python -m ai_audio_detector --predict-file path/to/audio.wav
python -m aiaa --predict-file path/to/audio.wav
```

3. **Choose option 1** to train new models and follow the prompts.
Expand All @@ -84,56 +84,56 @@ python -m ai_audio_detector --predict-file path/to/audio.wav

**Train models:**
```bash
ai-audio-detector --train --human-dir path/to/human/audio --ai-dir path/to/ai/audio
aiaa --train --human-dir path/to/human/audio --ai-dir path/to/ai/audio
```

**Predict single file:**
```bash
ai-audio-detector --predict-file path/to/audio.wav
aiaa --predict-file path/to/audio.wav
```

**Predict batch:**
```bash
ai-audio-detector --predict-batch path/to/audio/directory
aiaa --predict-batch path/to/audio/directory
```

**Interactive mode:**
```bash
ai-audio-detector --interactive
aiaa --interactive
```

### Predicting Single Files

**Interactive mode:**
```bash
ai-audio-detector --interactive
aiaa --interactive
# Choose option 2 and enter the path to your audio file
```

**Direct command:**
```bash
ai-audio-detector --predict-file path/to/audio.wav
aiaa --predict-file path/to/audio.wav
```

### Batch Prediction

**Interactive mode:**
```bash
ai-audio-detector --interactive
aiaa --interactive
# Choose option 3 and enter the directory path
```

**Direct command:**
```bash
ai-audio-detector --predict-batch path/to/audio/directory
aiaa --predict-batch path/to/audio/directory
```

## Advanced Usage

### Programmatic Usage

```python
from ai_audio_detector import AIAudioDetector
from aiaa import AIAudioDetector
from pathlib import Path

# Initialize detector
Expand Down Expand Up @@ -240,7 +240,7 @@ Modify `config.yaml` to customize:

## Output Files

- `models/ai_audio_detector.joblib` - Trained models and metadata
- `models/aiaa.joblib` - Trained models and metadata
- `training_results.csv` - Detailed training data and features
- `ai_detection_analysis.png` - Visualization plots
- `spectrograms/` - Generated spectrogram images
Expand Down Expand Up @@ -284,10 +284,10 @@ This project is licensed under the MIT License - see the LICENSE file for detail
If you use this work in your research, please cite:

```bibtex
@software{ai_audio_detector,
title={AI Audio Detector: Machine Learning System for Detecting AI-Generated Audio},
@software{aiaa,
title={AIAA: AI Audio Authenticity - Machine Learning System for Detecting AI-Generated Audio},
author={Alex Price},
year={2025},
url={https://github.com/yourusername/ai-audio-detector}
url={https://github.com/ajprice16/AI_Audio_Detection}
}
```
9 changes: 0 additions & 9 deletions ai_audio_detector/__main__.py

This file was deleted.

2 changes: 1 addition & 1 deletion ai_audio_detector/__init__.py → aiaa/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
AI Audio Detector using Benford's Law and librosa audio feature extraction.
AIAA: AI Audio Authenticity using Benford's Law and librosa audio feature extraction.
Trains Random Forest, Gradient Boosting, SGD, and Passive Aggressive classifiers.
Returns highest confidence prediction with detailed feature analysis.
"""
Expand Down
9 changes: 9 additions & 0 deletions aiaa/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env python3
"""
Entry point for running aiaa as a module.
"""

from aiaa import main

if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Audio analysis utilities for AI Audio Detector.
Audio analysis utilities for AIAA: AI Audio Authenticity.
"""

from typing import Dict, Any, Optional, Tuple, Union
Expand Down
16 changes: 8 additions & 8 deletions ai_audio_detector/cli.py → aiaa/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Command-line interface for AI Audio Detector.
Command-line interface for AIAA: AI Audio Authenticity.
"""

import argparse
Expand All @@ -18,7 +18,7 @@ def run_interactive_mode(detector: AIAudioDetector) -> None:
Args:
detector: Initialized AIAudioDetector instance.
"""
print("\n=== AI Audio Detector - Interactive Mode ===")
print("\n=== AIAA: AI Audio Authenticity - Interactive Mode ===")
print("Commands:")
print(" predict <file_path> - Predict if audio file is AI-generated")
print(" batch <directory> - Predict for all files in directory")
Expand Down Expand Up @@ -218,24 +218,24 @@ def run_interactive_mode(detector: AIAudioDetector) -> None:
def main() -> None:
"""Main entry point for the CLI."""
parser = argparse.ArgumentParser(
description="AI Audio Detector - Detect AI-generated audio using machine learning",
description="AIAA: AI Audio Authenticity - Detect AI-generated audio using machine learning",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog="""
Examples:
# Train models
python -m ai_audio_detector --train --ai-dir path/to/ai/audio --human-dir path/to/human/audio
python -m aiaa --train --ai-dir path/to/ai/audio --human-dir path/to/human/audio

# Predict single file
python -m ai_audio_detector --predict path/to/audio.wav
python -m aiaa --predict path/to/audio.wav

# Batch prediction
python -m ai_audio_detector --batch path/to/audio/directory
python -m aiaa --batch path/to/audio/directory

# Interactive mode
python -m ai_audio_detector --interactive
python -m aiaa --interactive

# Generate spectrogram
python -m ai_audio_detector --spectrogram path/to/audio.wav
python -m aiaa --spectrogram path/to/audio.wav
""",
)

Expand Down
2 changes: 1 addition & 1 deletion ai_audio_detector/config.py → aiaa/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Configuration management for AI Audio Detector.
Configuration management for AIAA: AI Audio Authenticity.
"""

from pathlib import Path
Expand Down
Loading
Loading