semvec/pypi-packages huggingface dataset:
pype-observe 1.0.0
Voice Analytics SDK for AI Agents
License: MIT
Requires Python: >=3.8
Keywords: voice analytics, AI agents, conversation intelligence, pype

# LiveKit Agent

## Prerequisites
- Python > 3.10
- `venv` (comes with Python)
- Internet connection for downloading models and dependencies

## Setup
```bash
python -m venv venv
source venv/bin/activate          # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python agent.py download-files
python agent.py console
```

## Usage & Metrics Collection

1. **Start the agent in console mode:**
   ```bash
   python agent.py console
   ```

2. **Interact with the agent** through voice or text input

3. **Stop the agent** by pressing `Ctrl + C` to gracefully shutdown and save metrics

4. **View collected metrics** in the generated file:
   ```bash
   cat livekit_agent_metrics.json
   ```

## Metrics Data

The agent automatically collects comprehensive metrics including:

- **LLM Metrics**: Token usage, response times (TTFT), model performance
- **TTS Metrics**: Character count, audio generation times (TTFB), audio duration
- **STT Metrics**: Audio processing duration, transcription accuracy
- **Session Data**: Conversation turns, timestamps, duration
- **Usage Summary**: Official LiveKit usage statistics

### Metrics File Structure
```json
{
  "sessions": [
    {
      "session_id": "uuid",
      "duration": 12.22,
      "total_llm_calls": 3,
      "total_llm_tokens_input": 71,
      "total_llm_tokens_output": 51,
      "total_tts_calls": 1,
      "total_tts_characters": 56,
      "total_stt_calls": 2,
      "total_stt_duration": 9.95,
      "conversation_turns": 7,
      "transcripts": [...],
      "usage_summary": {...}
    }
  ]
}
```

## Key Features

- ✅ **Automatic metrics collection** using LiveKit's official metrics system
- ✅ **Real-time monitoring** with console output during sessions
- ✅ **Persistent storage** in JSON format for analysis
- ✅ **Conversation tracking** with full transcript history
- ✅ **Usage analytics** for cost estimation and optimization
- ✅ **Error-safe serialization** handles all LiveKit metric types

## Troubleshooting

If you encounter any issues:
1. Ensure all dependencies are installed: `pip install -r requirements.txt`
2. Check that your environment variables are set correctly
3. Verify internet connection for model downloads
4. Make sure you have proper API keys configured
ml-graphy 0.1.1
A Python package for plotting machine learning training metrics
License: MIT
Requires Python: >=3.8
Keywords: machine learning, deep learning, plotting, metrics, visualization

# ml-graphy

A simple and elegant Python package for visualizing machine learning training metrics. `ml-graphy` automatically detects training and validation data to generate clean, publication-ready plots with just one line of code.

## Key Features

- **Automatic Metric Detection**: Intelligently finds `loss`, `accuracy`, `val_loss`, and `val_accuracy` in your model's history.
- **Publication-Ready Plots**: Creates beautiful, clean plots using Seaborn styling.
- **Simple API**: Generate insightful visualizations with a single function call.
- **Training Summary**: Prints a concise summary of final training and validation metrics.

## Installation

Install `ml-graphy` directly from PyPI:

```bash
pip install ml-graphy
```

This will automatically install the required dependencies: `matplotlib` and `seaborn`.

## Quick Start

Using `ml-graphy` is straightforward. Just import the `plot_metrics` function and pass it your trained model object that contains a `history` attribute.

```python
from mlgraphy.plotting import plot_metrics

# Create a mock model with a history attribute
class MockModel:
    def __init__(self):
        self.history = {
            'loss': [0.8, 0.6, 0.4, 0.3, 0.2],
            'accuracy': [0.6, 0.7, 0.8, 0.85, 0.9],
            'val_loss': [0.9, 0.7, 0.5, 0.4, 0.3],
            'val_accuracy': [0.55, 0.65, 0.75, 0.8, 0.85]
        }

# Create an instance and plot the metrics
model = MockModel()
plot_metrics(model)
```

This will generate and display side-by-side plots for loss and accuracy.

## What's Next?

The current version of `ml-graphy` focuses on simplicity and core functionality. Future releases will introduce more advanced features to provide greater flexibility and insight into your model's performance. We are actively working on expanding the library's capabilities to support a wider range of visualization needs.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.