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

@@ -8,6 +8,7 @@ import { handleCanvas, handleCanvasById, handleToolbarCanvas, handleDefaultCanva
import { handleGiteaRepo, handleGiteaTree, handleGiteaFile } from './gitea'
import { handleTables, handleStats, handleTableSchema, handleTableData, handleQuery } from './database'
import { handleWhisperRoutes } from './whisper'
import { handleRecordingsRoutes } from './recordings'
export async function handleRequest(req: Request): Promise<Response> {
const url = new URL(req.url)
@@ -175,5 +176,11 @@ export async function handleRequest(req: Request): Promise<Response> {
if (res) return res
}
// Voice recordings (for training custom models)
if (path.startsWith('/api/recordings')) {
const res = await handleRecordingsRoutes(req)
if (res) return res
}
return notFoundResponse()
}