feat: Auto-save voice recordings for model training

- Add /api/recordings endpoint with full CRUD operations
- Create voice_recordings SQLite table for metadata
- Save audio files to server/recordings/ as .webm
- Store transcription, duration, microphone name, file size
- Auto-save on each Whisper recording completion
This commit is contained in:
2026-02-14 01:56:53 -06:00
parent 5da6179f75
commit 950572046e
14 changed files with 229 additions and 0 deletions

View File

@@ -85,6 +85,20 @@ export function runMigrations(db: Database) {
)
`)
// Voice recordings table (for training custom speech models)
db.run(`
CREATE TABLE IF NOT EXISTS voice_recordings (
id INTEGER PRIMARY KEY AUTOINCREMENT,
filename TEXT NOT NULL,
transcription TEXT,
duration_ms INTEGER,
microphone TEXT,
sample_rate INTEGER,
file_size INTEGER,
created_at TEXT DEFAULT CURRENT_TIMESTAMP
)
`)
// Run column migrations for existing tables
runColumnMigrations(db)
}