Metadata-Version: 2.4
Name: psy-detector
Version: 0.1.0
Summary: A real-time sigh detection system using audio processing
Home-page: https://github.com/yourusername/psy-detector
Author: SemiQuant
Author-email: your.email@example.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: librosa>=0.10.1
Requires-Dist: numpy>=1.24.0
Requires-Dist: click>=8.1.7
Requires-Dist: soundfile>=0.12.1
Requires-Dist: scipy>=1.10.0
Requires-Dist: rich>=13.7.0
Requires-Dist: matplotlib>=3.8.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Psy Detector

Writing a thesis, working on a manuscript, track your anxitety.
A Python application that detects and counts sighs in real-time using your microphone. The application continuously monitors audio input to identify sigh patterns based on their acoustic characteristics.

## Installation

### From PyPI (Recommended)

```bash
pip install psy-detector
```

### From Source

1. Clone this repository
2. Install the required dependencies:
```bash
pip install -r requirements.txt
```

## Usage

Run the application to start monitoring your microphone:

```bash
psy-detector
```

### Options

- `--min-duration`: Minimum duration of a sigh in seconds (default: 0.5)
- `--max-duration`: Maximum duration of a sigh in seconds (default: 2.0)
- `--threshold`: Energy threshold for sigh detection (default: 0.3)

Example with custom parameters:
```bash
psy-detector --min-duration 0.3 --max-duration 1.5 --threshold 0.25
```

## How it Works

The application:
1. Continuously captures audio from your microphone
2. Processes the audio in real-time using a sliding window approach
3. Computes RMS energy and identifies potential sigh patterns
4. Filters and validates sighs based on duration and energy characteristics
5. Displays the total count and timestamp of detected sighs

## Features

- Real-time monitoring of microphone input
- Configurable detection parameters
- Live display of sigh count and timestamps
- Graceful shutdown with Ctrl+C

## Notes

- Make sure your microphone is properly connected and configured
- The application uses a 2-second sliding window for processing
- Press Ctrl+C to stop the monitoring

## Supported Audio Formats

The application supports common audio formats including WAV, MP3, and FLAC. 
