Tencent/WeKnora · error
audio transcription model is not configured
Error message
audio transcription model is not configured
What it means
Temporary document parsing in temporaryDocumentService.parse rejects audio files when no ASR (automatic speech recognition) model was selected. If the file extension is a known audio format (docparser.IsAudioFormat) but options.ASRModelID is empty, parsing cannot proceed, so it aborts with this error before any model lookup.
Source
Thrown at internal/application/service/temporary_document.go:373
defer file.Close()
data, err := io.ReadAll(io.LimitReader(file, secutils.GetMaxFileSizeMB()*1024*1024+1))
if err != nil {
return "", nil, nil, fmt.Errorf("read source file: %w", err)
}
ext := document.FileType
var options types.TemporaryDocumentCreateOptions
_ = json.Unmarshal(document.ProcessingOptions, &options)
if options.ParserEngine == "" || options.ParserEngine == "auto" {
if tenant, ok := ctx.Value(types.TenantInfoContextKey).(*types.Tenant); ok && tenant != nil {
options.ParserEngine = tenant.ParserEngineConfig.ResolveChatParserEngine(ext)
}
}
if _, ok := temporaryTextExtensions[ext]; ok && (options.ParserEngine == "" || options.ParserEngine == "auto") {
return string(data), nil, map[string]string{"parser": "plain_text"}, nil
}
if docparser.IsAudioFormat(ext) {
if options.ASRModelID == "" {
return "", nil, nil, fmt.Errorf("audio transcription model is not configured")
}
asrModel, err := s.modelService.GetASRModel(ctx, options.ASRModelID)
if err != nil {
return "", nil, nil, fmt.Errorf("load ASR model: %w", err)
}
result, err := asrModel.Transcribe(ctx, data, document.FileName)
if err != nil {
return "", nil, nil, fmt.Errorf("transcribe audio: %w", err)
}
return result.Text, nil, map[string]string{"parser": "asr"}, nil
}
parserEngine := strings.TrimSpace(options.ParserEngine)
if parserEngine == "auto" {
parserEngine = ""
}
request := &types.ReadRequest{
FileContent: data, FileName: document.FileName, FileType: strings.TrimPrefix(ext, "."),View on GitHub (pinned to 988cbb0330)
Solutions
- Pass a valid ASRModelID in the processing options when uploading audio files
- Configure a tenant/system default ASR model so callers do not need to set it explicitly
- Convert the audio to a supported text format before upload if transcription is not desired
- Return a clearer client-side message prompting the user to select a transcription model
Example fix
// before
svc.Process(ctx, req, types.ParseOptions{ParserEngine: "auto"})
// after
svc.Process(ctx, req, types.ParseOptions{ParserEngine: "auto", ASRModelID: asrModelID}) Defensive patterns
Strategy: validation
Validate before calling
if isAudioExt(filepath.Ext(fileName)) && opts.ASRModelID == "" {
return errors.New("audio files require a configured ASR model")
} Try / catch
var missingCfgErr = errors.New("audio transcription model is not configured")
if err := process(); err != nil {
if strings.Contains(err.Error(), "transcription model is not configured") {
// prompt user to select an ASR model
}
} Prevention
- Always set ASRModelID when uploading audio extensions
- Configure a tenant-level default ASR model
- Validate file extension vs available config client-side before upload
When it happens
Trigger: Uploading a temporary document with an audio extension (mp3, wav, m4a, etc.) via Process where ParserEngine is empty or "auto" and options.ASRModelID was not set by the caller.
Common situations: Frontend uploads an audio attachment but never picks a transcription model; default ASR model not configured at tenant/system level; API client omits asr_model_id in the upload request.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- load ASR model: %w
- transcribe audio: %w
- ErrInvalidCredentials
- invite code has expired
- join request not found
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/4b831e7a93935525.
Report an issue: GitHub.