usememos/memos · error
Internal
Internal
Error message
transcription response did not include text
What it means
After the audio LLM returned a transcription with FinishStop, the response's Text field was empty/whitespace, so the memo transcription pipeline treats it as an unusable result (Internal error). The model completed without producing any transcript content.
Source
Thrown at server/router/api/v1/ai_service.go:177
m, err := audiollmgemini.New(provider, audiollm.ApplyOptions(nil))
if err != nil {
return "", errors.Wrap(err, "failed to create audio LLM")
}
resp, err := m.GenerateFromAudio(ctx, audiollm.Request{
Audio: bytes.NewReader(content),
Size: int64(len(content)),
ContentType: contentType,
Model: model,
Instructions: buildTranscriptionInstructions(persisted.GetPrompt(), persisted.GetLanguage()),
})
if err != nil {
return "", err
}
if resp.FinishReason != audiollm.FinishStop {
return "", errors.Errorf("transcription incomplete (finish reason: %s)", resp.FinishReason)
}
if strings.TrimSpace(resp.Text) == "" {
return "", errors.New("transcription response did not include text")
}
return resp.Text, nil
}
func buildTranscriptionInstructions(prompt, language string) string {
parts := []string{
"Transcribe the audio accurately. Return only the transcript text. " +
"Do not summarize, explain, or add content that is not spoken.",
}
if language = strings.TrimSpace(language); language != "" {
parts = append(parts, "The input language is "+language+".")
}
if prompt = strings.TrimSpace(prompt); prompt != "" {
parts = append(parts, "Context and spelling hints:\n"+prompt)
}
return strings.Join(parts, "\n\n")
}
View on GitHub (pinned to 14d757ce1f)
Solutions
- Verify the audio actually contains speech (play it back; check duration/waveform)
- Confirm the AI provider and model settings in Memos are correct and the model supports audio transcription
- Retry once — occasional empty completions happen; if persistent, test the same file against the provider directly
- File an issue if the provider returns text in a field Memos does not map
Defensive patterns
Strategy: retry
Validate before calling
// Before transcribing, sanity-check the audio has speech-sized content
func likelyHasSpeech(path string) bool {
info, err := os.Stat(path)
if err != nil || info.Size() < 1024 { return false } // <1s of compressed audio
return true
} Try / catch
// Retry once, then surface a user-actionable error
text, err := transcribe(ctx, content)
if err != nil {
if strings.Contains(err.Error(), "did not include text") {
text, err = transcribe(ctx, content) // one retry for flaky completions
if err != nil { return status.Errorf(codes.InvalidArgument, "no speech detected in audio") }
} else { return err }
} Prevention
- Pre-validate audio duration/size client-side before requesting transcription
- Keep AI provider/model settings verified with a canary request at config time
- Treat empty transcripts as user-content issues first (silent audio), config issues second
When it happens
Trigger: Transcribing a silent or near-silent audio file, a file whose content is all filtered noise, or a model/provider misconfiguration that returns an empty completion; also possible when a provider returns content in a non-standard field Memos does not read.
Common situations: Uploading music/noise files expecting transcription; very short clips; wrong model name configured for the AI provider so responses lack text; provider API version changes altering the response shape.
Related errors
- webm has no Opus audio track
- aiSetting transcription configuration exceeds a supported le
- OpenAI API key is required
- AI provider capability unsupported
- aiSetting must be populated for key AI
AI-assisted analysis of usememos/memos@14d757ce1f (2026-08-15).
Data as JSON: /api/errors/7d0217adb23ebab9.
Report an issue: GitHub.