Port of OpenAI's Whisper model in C/C++
953 matches across 15 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | CMakeLists.txt | 141 | else() |
| LOW | ci/run.sh | 1 | #!/bin/bash |
| LOW | include/whisper.h | 1 | #ifndef WHISPER_H |
| LOW | include/whisper.h | 21 | # ifdef WHISPER_BUILD |
| LOW | include/whisper.h | 41 | |
| LOW | include/whisper.h | 61 | // } |
| LOW | include/whisper.h | 241 | WHISPER_API struct whisper_state * whisper_init_state(struct whisper_context * ctx); |
| LOW | include/whisper.h | 361 | // Examples: |
| LOW | tests/run-tests.sh | 1 | #!/bin/bash |
| LOW | tests/test-vad-full.cpp | 1 | #include "whisper.h" |
| LOW | models/convert-h5-to-ggml.py | 1 | # Convert Hugging Face fine-tuned models to ggml format |
| LOW | models/convert-pt-to-ggml.py | 1 | # Convert Whisper transformer model from PyTorch to ggml format |
| LOW | models/convert-pt-to-ggml.py | 21 | # - mel filters |
| LOW | models/convert-pt-to-ggml.py | 41 | import numpy as np |
| LOW | models/convert-pt-to-ggml.py | 61 | # "nl": "dutch", |
| LOW | models/convert-pt-to-ggml.py | 81 | # "hr": "croatian", |
| LOW | models/convert-pt-to-ggml.py | 101 | # "is": "icelandic", |
| LOW | models/convert-pt-to-ggml.py | 121 | # "tg": "tajik", |
| LOW | models/convert-pt-to-ggml.py | 141 | # "tt": "tatar", |
| LOW | examples/grammar-parser.h | 1 | // Implements a parser for an extended Backus-Naur form (BNF), producing the |
| LOW | examples/json.hpp | 21 | #include <algorithm> // all_of, find, for_each |
| LOW | examples/json.hpp | 41 | // SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me> |
| LOW | examples/json.hpp | 61 | #ifndef JSON_SKIP_LIBRARY_VERSION_CHECK |
| LOW | examples/json.hpp | 81 | #if JSON_DIAGNOSTICS |
| LOW | examples/json.hpp | 141 | { |
| LOW | examples/json.hpp | 161 | #include <algorithm> // transform |
| LOW | examples/json.hpp | 181 | |
| LOW | examples/json.hpp | 201 | #include <array> // array |
| LOW | examples/json.hpp | 221 | // | | |__ | | | | | | version 3.11.2 |
| LOW | examples/json.hpp | 321 | // | | |__ | | | | | | version 3.11.2 |
| LOW | examples/json.hpp | 341 | #define JSON_HEDLEY_STRINGIFY_EX(x) #x |
| LOW | examples/json.hpp | 361 | #define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c |
| LOW | examples/json.hpp | 381 | #define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) |
| LOW | examples/json.hpp | 401 | #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(ma |
| LOW | examples/json.hpp | 421 | #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0) |
| LOW | examples/json.hpp | 441 | #endif |
| LOW | examples/json.hpp | 461 | #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (0) |
| LOW | examples/json.hpp | 481 | #undef JSON_HEDLEY_SUNPRO_VERSION |
| LOW | examples/json.hpp | 501 | |
| LOW | examples/json.hpp | 521 | #if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION) |
| LOW | examples/json.hpp | 541 | #elif defined(__xlC__) && defined(__xlC_ver__) |
| LOW | examples/json.hpp | 561 | ( \ |
| LOW | examples/json.hpp | 581 | #undef JSON_HEDLEY_TI_CL2000_VERSION |
| LOW | examples/json.hpp | 601 | #endif |
| LOW | examples/json.hpp | 621 | #endif |
| LOW | examples/json.hpp | 641 | #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0) |
| LOW | examples/json.hpp | 661 | #undef JSON_HEDLEY_TI_CLPRU_VERSION |
| LOW | examples/json.hpp | 681 | #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL) |
| LOW | examples/json.hpp | 701 | #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VE |
| LOW | examples/json.hpp | 721 | #endif |
| LOW | examples/json.hpp | 741 | #endif |
| LOW | examples/json.hpp | 761 | #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0) |
| LOW | examples/json.hpp | 781 | #undef JSON_HEDLEY_MCST_LCC_VERSION |
| LOW | examples/json.hpp | 821 | #if defined(JSON_HEDLEY_GCC_VERSION) |
| LOW | examples/json.hpp | 841 | #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE |
| LOW | examples/json.hpp | 861 | #if \ |
| LOW | examples/json.hpp | 881 | #else |
| LOW | examples/json.hpp | 901 | #endif |
| LOW | examples/json.hpp | 921 | #if defined(JSON_HEDLEY_GCC_HAS_BUILTIN) |
| LOW | examples/json.hpp | 941 | #endif |
| 756 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | models/convert-silero-vad-to-ggml.py | 146 | # Check if this is a convolution weight tensor |
| LOW | models/download-ggml-model.sh | 27 | # Check if the script is inside a /bin/ directory |
| LOW | models/download-ggml-model.sh | 137 | # Check if 'whisper-cli' is available in the system PATH |
| LOW | models/download-coreml-model.sh | 24 | # Check if the script is inside a /bin/ directory |
| LOW | models/download-coreml-model.sh | 88 | # Check if 'whisper-cli' is available in the system PATH |
| LOW | models/download-vad-model.sh | 24 | # Check if the script is inside a /bin/ directory |
| LOW | models/download-vad-model.sh | 93 | # Check if 'whisper-cli' is available in the system PATH |
| LOW | examples/server.py | 60 | # Check if this is a request to a file in whisper.wasm |
| LOW | examples/python/whisper_processor.py | 17 | # Check if the file exists |
| LOW | scripts/bench.py | 128 | # Check if the sample file exists |
| LOW | scripts/apple/validate-macos.sh | 685 | # Check if authentication credentials are provided |
| LOW | scripts/apple/validate-macos.sh | 704 | # Check if app was created successfully |
| LOW | scripts/apple/validate-macos.sh | 712 | # Check if app binary exists and is executable |
| LOW | scripts/apple/validate-macos.sh | 720 | # Check if framework was properly embedded |
| LOW | scripts/apple/validate-macos.sh | 728 | # Check if framework binary exists |
| LOW | scripts/apple/validate-visionos.sh | 679 | # Check if authentication credentials are provided |
| LOW | scripts/apple/validate-visionos.sh | 704 | # Check if validation failed because the app isn't in App Store Connect |
| LOW | scripts/apple/validate-visionos.sh | 713 | # Check if IPA was created successfully |
| LOW | scripts/apple/validate-visionos.sh | 721 | # Check if app binary exists and is executable |
| LOW | scripts/apple/validate-visionos.sh | 729 | # Check if framework was properly embedded |
| LOW | scripts/apple/validate-visionos.sh | 737 | # Check if framework binary exists |
| LOW | scripts/apple/validate-ios.sh | 688 | # Check if authentication credentials are provided |
| LOW | scripts/apple/validate-ios.sh | 713 | # Check if validation failed because the app isn't in App Store Connect |
| LOW | scripts/apple/validate-ios.sh | 722 | # Check if IPA was created successfully |
| LOW | scripts/apple/validate-ios.sh | 730 | # Check if app binary exists and is executable |
| LOW | scripts/apple/validate-ios.sh | 738 | # Check if framework was properly embedded |
| LOW | scripts/apple/validate-ios.sh | 746 | # Check if framework binary exists |
| LOW | scripts/apple/validate-tvos.sh | 681 | # Check if authentication credentials are provided |
| LOW | scripts/apple/validate-tvos.sh | 706 | # Check if validation failed because the app isn't in App Store Connect |
| LOW | scripts/apple/validate-tvos.sh | 715 | # Check if IPA was created successfully |
| LOW | scripts/apple/validate-tvos.sh | 723 | # Check if app binary exists and is executable |
| LOW | scripts/apple/validate-tvos.sh | 731 | # Check if framework was properly embedded |
| LOW | scripts/apple/validate-tvos.sh | 739 | # Check if framework binary exists |
| LOW | ggml/src/ggml-virtgpu/regenerate_remoting.py | 46 | # Check if clang-format is available |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | build-xcframework.sh | 384 | # Create a separate directory for dSYMs for all platforms |
| MEDIUM | build-xcframework.sh | 392 | # Create a copy of the binary that will be stripped |
| MEDIUM | scripts/bench.py | 18 | # Define the argument to accept a list |
| MEDIUM | scripts/bench.py | 54 | # Define the models, threads, and processor counts to benchmark |
| MEDIUM | scripts/apple/validate-macos.sh | 571 | # Create a simple xcscheme file to avoid xcodebuild scheme issues |
| MEDIUM | scripts/apple/validate-macos.sh | 667 | # Create a zip file for potential distribution |
| MEDIUM | scripts/apple/validate-visionos.sh | 565 | # Create a simple xcscheme file to avoid xcodebuild scheme issues |
| MEDIUM | scripts/apple/validate-ios.sh | 574 | # Create a simple xcscheme file to avoid xcodebuild scheme issues |
| MEDIUM | scripts/apple/validate-tvos.sh | 567 | # Create a simple xcscheme file to avoid xcodebuild scheme issues |
| MEDIUM | .github/workflows/build.yml | 838 | # Create the directory where the CUDA Toolkit will be installed |
| MEDIUM | .github/workflows/build.yml | 894 | # Create the directory where the CUDA Toolkit will be installed |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | examples/talk-llama/llama-sampler.cpp | 2947 | // Step 1: Look for restart sequences to limit the maximum repetition length. |
| LOW | examples/talk-llama/llama-sampler.cpp | 3008 | // Step 2: Iterate in reverse over the last N tokens of the context, using the "Z-algorithm" (in |
| LOW | examples/talk-llama/llama-sampler.cpp | 3072 | // Step 3: Iterate over dry_repeat_count and last_tokens, examining the maximum repeat length |
| LOW | examples/talk-llama/llama-sampler.cpp | 3099 | // Step 4: Apply logit penalties based on the maximum repeat length for relevant tokens. |
| LOW | examples/talk-llama/models/kimi-linear.cpp | 197 | // Step 1: Q, K, V projections -> [d_inner, n_tokens] |
| LOW | examples/talk-llama/models/kimi-linear.cpp | 377 | // Step 1: Q projection and reshape |
| LOW | examples/talk-llama/models/kimi-linear.cpp | 382 | // Step 2: KV compression |
| LOW | ggml/src/ggml-webgpu/ggml-webgpu.cpp | 1290 | // For set rows specifically, we need to check if src and idx are empty |
| LOW | ggml/src/ggml-cann/aclnn_ops.cpp | 2809 | // Step 5: multiply by attn_factor |
| LOW | ggml/src/ggml-cann/aclnn_ops.cpp | 2826 | // Step 6: repeat |
| LOW | ggml/src/ggml-cann/aclnn_ops.cpp | 3090 | // Step 1: Prepare trans tensors for F16 type conversion to F32 if needed |
| LOW | ggml/src/ggml-cann/aclnn_ops.cpp | 3115 | // Step 2: Prepare head tensors for tail splitting if needed |
| LOW | ggml/src/ggml-cann/aclnn_ops.cpp | 3144 | // Step 3: Execute RotaryPositionEmbedding |
| LOW | ggml/src/ggml-cann/aclnn_ops.cpp | 3191 | // Step 4: Copy unrotated tail portion from source to destination |
| LOW | ggml/src/ggml-cann/aclnn_ops.cpp | 3220 | // Step 5: Cast back to F16 if needed |
| LOW | ggml/src/ggml-cann/aclnn_ops.cpp | 3906 | // Step 1: cast the src0 (Query) to fp16 if needed |
| LOW | ggml/src/ggml-cann/aclnn_ops.cpp | 3929 | // Step 2: create the acl tensors for src1 (Key), src2 (Value), |
| LOW | ggml/src/ggml-cann/aclnn_ops.cpp | 3973 | // Step 3: create the PSEShift tensor if needed |
| LOW | ggml/src/ggml-cann/aclnn_ops.cpp | 4042 | // Step 4: set the inputs for FusedInferAttention. |
| LOW | ggml/src/ggml-cann/aclnn_ops.cpp | 4103 | // Step 6: post-processing — slice padded output and/or cast to f32 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | examples/stb_vorbis.c | 51 | // 1.10 - 2017-03-03 - more robust seeking; fix negative ilog(); clear error in open_memory |
| MEDIUM | ggml/src/ggml-zendnn/ggml-zendnn.cpp | 600 | // gather + batched matmul + scatter approach. Future versions will leverage |
| MEDIUM | ggml/src/ggml-cpu/amx/mmq.cpp | 603 | // pack again with 128 to fully utilize vector length |
| MEDIUM | ggml/src/ggml-cpu/amx/mmq.cpp | 645 | // pack again with 128 to fully utilize vector length |
| MEDIUM | ggml/src/ggml-cpu/amx/mmq.cpp | 743 | // pack again with 128 to fully utilize vector length |
| MEDIUM | ggml/src/ggml-opencl/ggml-opencl.cpp | 4396 | // that wraps around q and d to utilize image access path. |
| MEDIUM | ggml/src/ggml-opencl/ggml-opencl.cpp | 4430 | // that wraps around q and d to utilize image access path. |
| MEDIUM | src/whisper.cpp | 8371 | // guaranteed. Might get removed at some point unless a robust algorithm implementation is found |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | models/convert-pt-to-ggml.py | 206 | except Exception: |
| MEDIUM | models/convert-pt-to-ggml.py | 207 | print("Error: failed to load PyTorch model file:" , fname_inp) |
| MEDIUM | models/convert-pt-to-ggml.py | 238 | print("Error: failed to find either tiktoken or hf_transformers tokenizer file:", tokenizer) |
| MEDIUM | examples/server.py | 119 | print(f"Error: {e}") |
| LOW | examples/python/test_whisper_processor.py | 6 | except Exception as e: |
| MEDIUM | examples/python/test_whisper_processor.py | 7 | print(f"Error: {e}") |
| LOW | examples/python/whisper_processor.py | 48 | except Exception as e: |
| MEDIUM | examples/python/whisper_processor.py | 49 | print(f"Error: {e}") |
| MEDIUM | …r.swiftui/whisper.swiftui.demo/UI/DownloadButton.swift | 32 | print("Error: \(error.localizedDescription)") |
| MEDIUM | …r.swiftui/whisper.swiftui.demo/UI/DownloadButton.swift | 48 | print("Error: \(err.localizedDescription)") |
| MEDIUM | …r.swiftui/whisper.swiftui.demo/UI/DownloadButton.swift | 90 | print("Error deleting file: \(error)") |
| LOW | ggml/src/ggml-virtgpu/regenerate_remoting.py | 69 | except Exception as e: |
| LOW | ggml/src/ggml-virtgpu/regenerate_remoting.py | 327 | except Exception as e: |
| MEDIUM | ggml/src/ggml-virtgpu/regenerate_remoting.py | 323 | def main(): |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/earnings21/normalizers/basic.py | 27 | def remove_symbols_and_diacritics(s: str, keep=""): |
| LOW | tests/librispeech/normalizers/basic.py | 27 | def remove_symbols_and_diacritics(s: str, keep=""): |
| LOW | models/convert-whisper-to-coreml.py | 38 | def correct_for_bias_scale_order_inversion(state_dict, prefix, local_metadata, |
| LOW | examples/server.py | 15 | class CustomHTTPRequestHandler(http.server.SimpleHTTPRequestHandler): |
| LOW | …/wchess.wasm/chessboardjs-1.0.0/js/chessboard-1.0.0.js | 496 | function calculatePositionFromMoves (position, moves) { |
| LOW | …/wchess.wasm/chessboardjs-1.0.0/js/chessboard-1.0.0.js | 541 | function expandConfigArgumentShorthand (config) { |
| LOW | …/wchess.wasm/chessboardjs-1.0.0/js/chessboard-1.0.0.js | 951 | function animateSparePieceToSquare (piece, dest, completeFn) { |
| LOW | bindings/javascript/whisper.js | 8 | function GROWABLE_HEAP_I8(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAP8}function GROWABLE_HEAP_ |
| LOW | bindings/ruby/test/test_context_params.rb | 60 | def test_new_with_kw_args_default_values(param) |
| LOW | bindings/ruby/test/test_vad_params.rb | 83 | def test_new_with_kw_args_default_values(param) |
| LOW | bindings/ruby/test/test_params.rb | 278 | def test_new_with_kw_args_default_values(param) |
| LOW | ggml/include/ggml-backend.h | 211 | typedef ggml_backend_buffer_type_t (*ggml_backend_split_buffer_type_t)(int main_device, const float * tensor_split |
| LOW | ggml/src/ggml-virtgpu/regenerate_remoting.py | 49 | def _check_clang_format_available(self) -> bool: |
| LOW | ggml/src/ggml-virtgpu/regenerate_remoting.py | 53 | def _format_file_with_clang_format(self, file_path: Path) -> bool: |
| LOW | ggml/src/ggml-virtgpu/regenerate_remoting.py | 78 | def generate_backend_function_name(self, group_name: str, function_name: str) -> str: |
| LOW | ggml/src/ggml-virtgpu/regenerate_remoting.py | 89 | def generate_frontend_function_name(self, group_name: str, function_name: str) -> str: |
| LOW | ggml/src/ggml-virtgpu/regenerate_remoting.py | 125 | def generate_apir_backend_header(self) -> str: |
| LOW | ggml/src/ggml-virtgpu/regenerate_remoting.py | 176 | def generate_backend_dispatched_header(self) -> str: |
| LOW | ggml/src/ggml-virtgpu/regenerate_remoting.py | 222 | def generate_virtgpu_forward_header(self) -> str: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | examples/addon.node/CMakeLists.txt | 4 | #================================================================== |
| MEDIUM | examples/addon.node/CMakeLists.txt | 8 | #================================================================== |
| MEDIUM | examples/addon.node/CMakeLists.txt | 16 | #================================================================== |
| MEDIUM | examples/addon.node/CMakeLists.txt | 24 | #================================================================== |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | CONTRIBUTING.md | 18 | Code that is initially generated by AI and subsequently edited will still be considered AI-generated. AI assistance is p |
| HIGH | ggml/src/ggml-virtgpu/regenerate_remoting.py | 3 | # Generated by Claude AI |
| HIGH | ggml/src/ggml-hexagon/ggml-hexagon.cpp | 2484 | // Check for F16 support only as requested |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/earnings21/normalizers/__init__.py | 1 | |
| LOW | tests/earnings21/normalizers/__init__.py | 2 | |
| LOW | tests/librispeech/normalizers/__init__.py | 1 | |
| LOW | tests/librispeech/normalizers/__init__.py | 2 | |
| LOW | models/convert-h5-to-ggml.py | 18 | |
| LOW | models/convert-h5-to-ggml.py | 23 | |
| LOW | models/convert-silero-vad-to-ggml.py | 4 | |
| LOW | models/convert-pt-to-ggml.py | 35 | |
| LOW | models/convert-pt-to-ggml.py | 39 | |
| LOW | models/convert-h5-to-coreml.py | 13 | |
| LOW | examples/server.py | 6 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | examples/wchess/wchess.wasm/jquery-3.7.1.min.js | 2 | !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):f |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/run-tests.sh | 14 | # Usage: |
| LOW | models/convert-h5-to-ggml.py | 3 | # Usage: |
| LOW | examples/generate-karaoke.sh | 4 | # Usage: |
| LOW | examples/yt-wsp.sh | 31 | # Sample usage: |
| LOW | scripts/sync-ggml-am.sh | 5 | # Usage: |
| LOW | ggml/src/ggml-sycl/dpct/helper.hpp | 3012 | /// Example usage: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/earnings21/normalizers/english.py | 165 | |
| LOW | tests/librispeech/normalizers/english.py | 165 | |
| LOW | examples/server.py | 19 | |
| LOW | ggml/src/ggml-webgpu/wgsl-shaders/embed_wgsl.py | 68 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/run-tests.sh | 62 | # when adding new files, make sure to add the expected "ref.txt" file with the correct transcript |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | bindings/javascript/whisper.js | 8 | function GROWABLE_HEAP_I8(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAP8}function GROWABLE_HEAP_ |