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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user