{"record":{"id":"5b66ae02b740499a","repo":"Mintplex-Labs/anything-llm","slug":"the-native-whisper-model-failed-to-download-from-t","errorCode":null,"errorMessage":"The native whisper model failed to download from the huggingface.co CDN. Your internet connection may be unstable or blocked by Huggingface.co - you will need to download the model manually and place it in the storage/models folder to use local Whisper transcription.","messagePattern":"The native whisper model failed to download from the huggingface\\.co CDN\\. Your internet connection may be unstable or blocked by Huggingface\\.co - you will need to download the model manually and place it in the storage/models folder to use local Whisper transcription\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"collector/utils/WhisperProviders/localWhisper.js","lineNumber":158,"sourceCode":"                    data.file\n                  } ${~~data?.progress}%`\n                );\n              },\n            }\n          : {}),\n      });\n    } catch (error) {\n      let errMsg = error.message;\n      if (errMsg.includes(\"Could not locate file\")) {\n        errMsg =\n          \"The native whisper model failed to download from the huggingface.co CDN. Your internet connection may be unstable or blocked by Huggingface.co - you will need to download the model manually and place it in the storage/models folder to use local Whisper transcription.\";\n      }\n\n      this.#log(\n        `Failed to load the native whisper model: ${errMsg}`,\n        error.stack\n      );\n      throw new Error(errMsg);\n    }\n  }\n\n  async processFile(fullFilePath, filename) {\n    try {\n      const audioDataPromise = new Promise((resolve) =>\n        this.#convertToWavAudioData(fullFilePath).then((audioData) =>\n          resolve(audioData)\n        )\n      );\n      const [audioData, transcriber] = await Promise.all([\n        audioDataPromise,\n        this.client(),\n      ]);\n\n      if (!audioData) {\n        this.#log(`Failed to parse content from ${filename}.`);\n        return {","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/526360e320da9d1b36074be5ed64fe76e5bbfbbd/collector/utils/WhisperProviders/localWhisper.js#L140-L176","documentation":"When @xenova/transformers' pipeline() fails to load the model and the error contains \"Could not locate file\", LocalWhisper rewrites the message to explain the HuggingFace CDN download failed and that the model must be placed manually under storage/models. This is what users see when the model cannot be fetched.","triggerScenarios":"pipeline(\"automatic-speech-recognition\", model, { cache_dir }) throws \"Could not locate file ...\" — offline/unstable network, huggingface.co blocked, a partial download left an incomplete cache, or a wrong model name (WhisperModelPref).","commonSituations":"Air-gapped/corporate firewall blocking huggingface.co; flaky connection leaving a partial cache; STORAGE_DIR misconfigured so cache_dir is not writable; wrong WhisperModelPref value.","solutions":["Download the model manually from huggingface.co (e.g. Xenova/whisper-small) and place it under storage/models.","Ensure network access to huggingface.co (proxy/firewall).","Clear the partial cache (storage/models/Xenova/whisper-small) and retry.","Verify STORAGE_DIR points to a writable, persistent location."],"exampleFix":"// before\nif (errMsg.includes(\"Could not locate file\")) {\n  errMsg = \"The native whisper model failed to download...\";\n}\n\n// after — hint at the exact target path\nif (errMsg.includes(\"Could not locate file\")) {\n  errMsg = `Model download failed. Place the model under ${this.cacheDir} manually, or check connectivity to huggingface.co.`;\n}","handlingStrategy":"fallback","validationCode":"const fs = require(\"fs\");\nconst path = require(\"path\");\nfunction modelCached(cacheDir, model) {\n  return fs.existsSync(path.resolve(cacheDir, ...model.split(\"/\")));\n}\n// if (!modelCached(cacheDir, model)) prompt user / pre-download;","typeGuard":null,"tryCatchPattern":"try { await localWhisper.client(); }\ncatch (e) {\n  if (e.message.includes(\"failed to download\")) {\n    // fall back to a cloud transcription provider or guide manual download\n  }\n  throw e;\n}","preventionTips":["Pre-download and vendor the Whisper model for offline/air-gapped installs.","Whitelist huggingface.co on corporate firewalls.","Make STORAGE_DIR writable and persistent.","Clear a partial model cache before retrying."],"tags":["whisper","model-download","network","huggingface","setup"],"backgroundTag":null,"analyzedSha":"526360e320da9d1b36074be5ed64fe76e5bbfbbd","analyzedAt":"2026-08-13T01:45:47.170Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}