--- src/whisper.cpp.orig	2025-04-12 18:05:12
+++ src/whisper.cpp	2025-04-12 18:05:53
@@ -3634,17 +3634,50 @@
 
 struct whisper_context * whisper_init_from_file_with_params_no_state(const char * path_model, struct whisper_context_params params) {
     WHISPER_LOG_INFO("%s: loading model from '%s'\n", __func__, path_model);
+
 #ifdef _MSC_VER
-    // Convert UTF-8 path to wide string (UTF-16) for Windows, resolving character encoding issues.
     std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
     std::wstring path_model_wide = converter.from_bytes(path_model);
     auto fin = std::ifstream(path_model_wide, std::ios::binary);
 #else
     auto fin = std::ifstream(path_model, std::ios::binary);
 #endif
+
     if (!fin) {
         WHISPER_LOG_ERROR("%s: failed to open '%s'\n", __func__, path_model);
-        return nullptr;
+
+        const std::string fallback_dir = "__PREFIX__/share/whisper/models";
+        std::string fallback_path;
+
+        DIR *dir = opendir(fallback_dir.c_str());
+        if (dir) {
+            struct dirent *entry;
+            while ((entry = readdir(dir)) != nullptr) {
+                std::string filename = entry->d_name;
+                if (filename.size() > 4 && filename.substr(filename.size() - 4) == ".bin") {
+                    fallback_path = fallback_dir + "/" + filename;
+                    break;
+                }
+            }
+            closedir(dir);
+        }
+
+        if (fallback_path.empty()) {
+            WHISPER_LOG_ERROR("%s: no .bin files found in fallback directory '%s'\n", __func__, fallback_dir.c_str());
+            return nullptr;
+        }
+
+#ifdef _MSC_VER
+        std::wstring fallback_path_wide = converter.from_bytes(fallback_path);
+        fin.open(fallback_path_wide, std::ios::binary);
+#else
+        fin.open(fallback_path, std::ios::binary);
+#endif
+
+        if (!fin) {
+            WHISPER_LOG_ERROR("%s: failed to open fallback file '%s'\n", __func__, fallback_path.c_str());
+            return nullptr;
+        }
     }
 
     whisper_model_loader loader = {};
