package api import "go-whisper-api/whisper" // sprResultReady builds GET /spr/result/{taskID} body for completed tasks (SPR-compatible). func sprResultReady(params TaskParams) map[string]any { words := params.Words if words == nil { words = []whisper.Word{} } return map[string]any{ "model": params.Model, "text": params.Text, "words": words, "toxicity": map[string]float64{ "insult": 0, "obscenity": 0, "threat": 0, "politeness": 0, }, "emotion": map[string]any{}, "voice_analysis": map[string]any{}, "status": "ready", "taskID": params.ID, "created": params.Created, "processed": params.Processed, } }