danielrosehill's picture
Updated for schema conformity
616e22b
# Annotation Schema
This directory contains the versioned annotation schema for the Voice Note Dataset.
## Current Schema Version
**Version:** 1.0.0
**File:** `annotation_schema_v1.json`
**Last Updated:** 2025-10-26
## Schema Purpose
The annotation schema defines the structure and categories for annotating voice recordings with:
1. **Classification** - What type of content the note represents (31 categories)
2. **Audio Defects** - Quality issues and environmental noise (10 categories)
3. **Content Issues** - Content-level problems in the recording (5 categories)
4. **Languages** - Languages present in multi-language recordings (7 languages)
5. **Transcription Quality** - Assessment of transcription accuracy (5 levels)
6. **Notes** - Free-form text annotations
## Using the Schema
### In the Web UI
The Voice Note Dataset Manager web interface automatically loads and uses this schema to:
- Dynamically generate annotation checkboxes and options
- Validate annotation data
- Track schema version with each entry
### Programmatically
```python
import json
# Load the schema
with open('schema/annotation_schema_v1.json', 'r') as f:
schema = json.load(f)
# Access schema information
print(f"Schema Version: {schema['version']}")
print(f"Description: {schema['description']}")
# Get classification categories
classifications = schema['schema']['classification']['categories']
for category in classifications:
print(f"- {category['label']}: {category['description']}")
```
### Via API
The Flask backend serves the schema via the `/api/schema` endpoint:
```javascript
// Fetch the current schema
const response = await fetch('/api/schema');
const schema = await response.json();
console.log('Schema version:', schema.version);
```
## Schema Evolution
When updating the schema:
1. **Create a new version file**: `annotation_schema_v{N}.json`
2. **Update the API** in `app.py` to point to the new version
3. **Document changes** in this README
4. **Maintain backward compatibility** when possible
5. **Update the HF dataset** copy in `/home/daniel/repos/hugging-face/datasets/public/Voice-Note-Audio/`
## Version History
### Version 1.0.0 (2025-10-26)
Initial schema release:
- 31 classification categories covering communication, development, content creation, and personal notes
- 10 audio defect categories for real-world STT evaluation
- 5 content issue types
- 7 language tags for multi-language support
- 5 transcription quality levels
- Free-form notes field
- Schema versioning metadata
## Schema Distribution
This schema is distributed in three locations:
1. **Development Repository**: `/home/daniel/repos/github/Voice-Note-Dataset/schema/`
2. **Hugging Face Dataset**: `/home/daniel/repos/hugging-face/datasets/public/Voice-Note-Audio/`
3. **Runtime**: Served via Flask API at `/api/schema`
When updating, ensure all three locations are synchronized.
## Contact
For questions or suggestions about the schema:
- **Author**: Daniel Rosehill
- **Email**: public@danielrosehill.com