On-device Speech AI for Apple Silicon
This report presents the forensic synthetic code analysis of argmaxinc/argmax-oss-swift, a Swift project with 6,264 GitHub stars. SynthScan v2.0 examined 60,950 lines of code across 214 source files, recording 224 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 4.1 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 224 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Package@swift-6.2.swift | 161 | // These reduce false-positive concurrency diagnostics by making the | COMMENT |
| LOW | …ts/ArgmaxCoreTests/External/Tokenizers/TrieTests.swift | 1 | // Originally from: https://github.com/huggingface/swift-transformers | COMMENT |
| LOW | …ArgmaxCoreTests/External/Tokenizers/DecoderTests.swift | 1 | // Originally from: https://github.com/huggingface/swift-transformers | COMMENT |
| LOW | …ArgmaxCoreTests/External/Tokenizers/FactoryTests.swift | 1 | // Originally from: https://github.com/huggingface/swift-transformers | COMMENT |
| LOW | …gmaxCoreTests/External/Tokenizers/TokenizerTests.swift | 1 | // Originally from: https://github.com/huggingface/swift-transformers | COMMENT |
| LOW | …xCoreTests/External/Tokenizers/PreTokenizerTests.swift | 1 | // Originally from: https://github.com/huggingface/swift-transformers | COMMENT |
| LOW | Tests/ArgmaxCoreTests/External/Hub/ConfigTests.swift | 1 | // Originally from: https://github.com/huggingface/swift-transformers | COMMENT |
| LOW | Tests/ArgmaxCoreTests/External/Hub/ConfigTests.swift | 121 | #expect(cfgArray.array() == [1, 2, 3, 4]) | COMMENT |
| LOW | Tests/ArgmaxCoreTests/External/Hub/ConfigTests.swift | 141 | #expect(cfgStrings.get() == ["a", "b", "c"]) | COMMENT |
| LOW | Tests/ArgmaxCoreTests/External/Hub/ConfigTests.swift | 201 | #expect(got["dict_of_bools"]["key4"] == false) | COMMENT |
| LOW | Tests/ArgmaxCoreTests/External/Hub/ConfigTests.swift | 221 | @Test("Equatable: string, integer, float, boolean, token, dictionary") | COMMENT |
| LOW | …sts/ArgmaxCoreTests/External/Hub/DownloaderTests.swift | 1 | // Originally from: https://github.com/huggingface/swift-transformers | COMMENT |
| LOW | Tests/WhisperKitTests/Evaluate/NormalizeEn.swift | 661 | #"\bimma\b"#: "i am going to", | COMMENT |
| LOW | Tests/WhisperKitTests/Evaluate/NormalizeEn.swift | 681 | #"\basst\b"#: "assistant ", | COMMENT |
| LOW | …t/Sources/WhisperKitSwiftClient/Generated/Client.swift | 1 | // Generated by swift-openapi-generator, do not modify. | COMMENT |
| LOW | …t/Sources/WhisperKitSwiftClient/Generated/Client.swift | 21 | /// To regenerate this file: | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 1 | // Generated by swift-openapi-generator, do not modify. | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 161 | /// - Remark: Generated from `#/components/schemas/CreateTranscriptionRequest/stream`. | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 181 | public var text: Swift.String | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 221 | public typealias logprobsPayload = [Components.Schemas.CreateTranscriptionResponseJson.logprobsPayloadPayloa | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 301 | } | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 321 | /// - Remark: Generated from `#/components/schemas/CreateTranscriptionResponseVerboseJson/words`. | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 461 | public struct CreateTranslationResponseVerboseJson: Codable, Hashable, Sendable { | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 521 | /// - Remark: Generated from `#/components/schemas/TranscriptTextDeltaEvent/type`. | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 541 | public var token: Swift.String? | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 601 | case logprobs | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 621 | /// | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 661 | } | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 701 | /// | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 721 | /// | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 741 | /// | COMMENT |
| LOW | …ft/Sources/WhisperKitSwiftClient/Generated/Types.swift | 1301 | } | COMMENT |
| LOW | …les/TTS/TTSKitExample/TTSKitExample/WaveformView.swift | 1 | // For licensing see accompanying LICENSE.md file. | COMMENT |
| LOW | …mples/TTS/TTSKitExample/TTSKitExample/DetailView.swift | 201 | // .overlay(alignment: .topTrailing) { | COMMENT |
| LOW | …es/TTS/TTSKitExample/TTSKitExample/FileUtilities.swift | 1 | // For licensing see accompanying LICENSE.md file. | COMMENT |
| LOW | …es/TTS/TTSKitExample/TTSKitExample/AudioMetadata.swift | 61 | COMMENT | |
| LOW | Sources/TTSKit/Models.swift | 1 | // For licensing see accompanying LICENSE.md file. | COMMENT |
| LOW | Sources/TTSKit/Models.swift | 81 | /// ```swift | COMMENT |
| LOW | Sources/TTSKit/Models.swift | 101 | /// - voice: Voice/speaker identifier. `nil` uses the model's default voice. | COMMENT |
| LOW | Sources/TTSKit/Models.swift | 141 | /// pipeline (MultiCodeDecoder + SpeechDecoder + CodeDecoder) before any audio | COMMENT |
| LOW | Sources/TTSKit/Models.swift | 161 | COMMENT | |
| LOW | Sources/TTSKit/Models.swift | 181 | /// Compute the required pre-buffer duration (seconds) given a measured step time. | COMMENT |
| LOW | Sources/TTSKit/Models.swift | 241 | COMMENT | |
| LOW | Sources/TTSKit/Protocols.swift | 121 | /// model's `key_cache` input shape after `loadModel`. | COMMENT |
| LOW | Sources/TTSKit/TTSKit.swift | 1 | // For licensing see accompanying LICENSE.md file. | COMMENT |
| LOW | Sources/TTSKit/TTSKit.swift | 21 | /// tts.codeDecoder = MyOptimisedCodeDecoder() | COMMENT |
| LOW | Sources/TTSKit/TTSKit.swift | 241 | /// Fetch all available model variants from the HuggingFace Hub. | COMMENT |
| LOW | Sources/TTSKit/TTSKit.swift | 281 | /// Mirrors `WhisperKit.download(variant:downloadBase:from:token:progressCallback:)`. | COMMENT |
| LOW | Sources/TTSKit/TTSKit.swift | 361 | /// Mirrors `WhisperKit.setupModels(model:downloadBase:modelRepo:...)`. Populates | COMMENT |
| LOW | Sources/TTSKit/TTSKit.swift | 421 | /// Prewarm all CoreML models by compiling them sequentially, then discarding weights. | COMMENT |
| LOW | Sources/TTSKit/TTSKit.swift | 521 | COMMENT | |
| LOW | Sources/TTSKit/TTSKit.swift | 601 | /// CodeDecoder, returning a reusable cache that eliminates ~90% of prefill cost | COMMENT |
| LOW | Sources/TTSKit/TTSKit.swift | 981 | COMMENT | |
| LOW | Sources/TTSKit/Configurations.swift | 1 | // For licensing see accompanying LICENSE.md file. | COMMENT |
| LOW | Sources/TTSKit/Generating.swift | 1 | // For licensing see accompanying LICENSE.md file. | COMMENT |
| LOW | Sources/TTSKit/Generating.swift | 41 | /// - Parameters: | COMMENT |
| LOW | Sources/TTSKit/Qwen3TTS/Qwen3SpeechDecoder.swift | 1 | // For licensing see accompanying LICENSE.md file. | COMMENT |
| LOW | Sources/TTSKit/Qwen3TTS/Qwen3Config.swift | 121 | /// | COMMENT |
| LOW | Sources/TTSKit/Qwen3TTS/Qwen3Config.swift | 141 | /// ├── text_projector/<versionDir>/<variant>/*.mlmodelc | COMMENT |
| LOW | Sources/TTSKit/Qwen3TTS/Qwen3Config.swift | 221 | /// Use a background `URLSession` for model downloads. | COMMENT |
| 99 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Tests/WhisperKitTests/RegressionTestUtils.swift | 383 | print("Error retrieving file system attributes: \(error)") | CODE |
| MEDIUM | Tests/WhisperKitTests/RegressionTestUtils.swift | 404 | print("Error retrieving file system attributes: \(error)") | CODE |
| MEDIUM | Tests/WhisperKitTests/Evaluate/NormalizeEn.swift | 25 | print("Error while creating regex: \(error)") | CODE |
| MEDIUM | Tests/WhisperKitTests/Evaluate/NormalizeEn.swift | 599 | print("Error in regex: \(error)") | CODE |
| MEDIUM | Tests/WhisperKitTests/Evaluate/NormalizeEn.swift | 611 | print("Error in regex: \(error)") | CODE |
| MEDIUM | Examples/WhisperAX/WhisperAX/Views/ContentView.swift | 1315 | print("Error enumerating files at \(modelPath): \(error.localizedDescription)") | CODE |
| MEDIUM | Examples/WhisperAX/WhisperAX/Views/ContentView.swift | 1409 | print("Error prewarming models, retrying: \(error.localizedDescription)") | STRING |
| MEDIUM | Examples/WhisperAX/WhisperAX/Views/ContentView.swift | 1492 | print("Error deleting model: \(error)") | STRING |
| MEDIUM | Examples/WhisperAX/WhisperAX/Views/ContentView.swift | 1642 | print("Error: \(error.localizedDescription)") | STRING |
| MEDIUM | Examples/WhisperAX/WhisperAX/Views/ContentView.swift | 1886 | print("Error: \(error.localizedDescription)") | STRING |
| MEDIUM | …WhisperAX/WhisperAXWatchApp/WhisperAXExampleView.swift | 309 | print("Error enumerating files at \(modelPath): \(error.localizedDescription)") | CODE |
| MEDIUM | …WhisperAX/WhisperAXWatchApp/WhisperAXExampleView.swift | 389 | print("Error prewarming models, retrying: \(error.localizedDescription)") | CODE |
| MEDIUM | …WhisperAX/WhisperAXWatchApp/WhisperAXExampleView.swift | 553 | print("Error: \(error.localizedDescription)") | CODE |
| MEDIUM | Examples/ServeCLIClient/Python/test_transcribe.py | 29 | print(f"Error: Test resources directory not found: {resources_dir}") | CODE |
| LOW | Examples/ServeCLIClient/Python/test_transcribe.py | 68 | except Exception as e: | CODE |
| MEDIUM | Examples/ServeCLIClient/Python/test_transcribe.py | 69 | print(f"Error transcribing {audio_file_path.name}: {e}") | CODE |
| MEDIUM | Examples/ServeCLIClient/Python/test_transcribe.py | 131 | print(f"Error: Test file '{args.file}' not found") | CODE |
| MEDIUM | Examples/ServeCLIClient/Python/test_translate.py | 29 | print(f"Error: Test resources directory not found: {resources_dir}") | CODE |
| LOW | Examples/ServeCLIClient/Python/test_translate.py | 65 | except Exception as e: | CODE |
| MEDIUM | Examples/ServeCLIClient/Python/test_translate.py | 66 | print(f"Error translating {audio_file_path.name}: {e}") | CODE |
| MEDIUM | Examples/ServeCLIClient/Python/test_translate.py | 126 | print(f"Error: Test file '{args.file}' not found") | CODE |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 40 | except Exception as e: | CODE |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 52 | except Exception as e: | CODE |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 141 | except Exception as e: | CODE |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 226 | except Exception as e: | CODE |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 299 | except Exception as e: | CODE |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 430 | except Exception as e: | CODE |
| MEDIUM | scripts/generate_local_server_openapi.py | 52 | print(f"Error fetching latest spec: {e}") | CODE |
| MEDIUM | scripts/generate_local_server_openapi.py | 312 | print(f"Error: {input_file} not found") | CODE |
| MEDIUM | Sources/ArgmaxCLI/TranscribeCLI.swift | 259 | print("Error when transcribing \(audioPath): \(error)") | CODE |
| MEDIUM | Sources/ArgmaxCLI/TranscribeCLI.swift | 269 | print("Error during diarization for \(audioPath): \(error)") | CODE |
| MEDIUM | Sources/ArgmaxCLI/TranscribeCLI.swift | 413 | print("Error: \(error.localizedDescription)") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Examples/ServeCLIClient/Python/test_transcribe.py | 73 | CODE | |
| LOW | Examples/ServeCLIClient/Python/test_translate.py | 70 | CODE | |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 435 | CODE | |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 56 | CODE | |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 145 | CODE | |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 241 | CODE | |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 370 | CODE | |
| LOW | scripts/generate_local_server_openapi.py | 73 | CODE | |
| LOW | scripts/generate_local_server_openapi.py | 213 | CODE | |
| LOW | scripts/generate_local_server_openapi.py | 114 | CODE | |
| LOW | scripts/generate_local_server_openapi.py | 128 | CODE | |
| LOW | scripts/generate_local_server_openapi.py | 193 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Examples/ServeCLIClient/Curl/transcribe.sh | 95 | # Check if audio file is provided | COMMENT |
| LOW | Examples/ServeCLIClient/Curl/transcribe.sh | 102 | # Check if audio file exists | COMMENT |
| LOW | Examples/ServeCLIClient/Curl/translate.sh | 105 | # Check if audio file is provided | COMMENT |
| LOW | Examples/ServeCLIClient/Curl/translate.sh | 112 | # Check if audio file exists | COMMENT |
| LOW | Examples/ServeCLIClient/Curl/test.sh | 32 | # Check if server is running | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Sources/ArgmaxCore/External/Hub/Downloader.swift | 17 | /// A robust file downloader with support for resumable downloads and progress reporting. | COMMENT |
| MEDIUM | Sources/ArgmaxCore/External/Hub/HubApi.swift | 66 | /// background downloads, and automatic retry mechanisms for robust file transfers. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Examples/ServeCLIClient/Python/test_transcribe.py | 11 | CODE | |
| LOW | Examples/ServeCLIClient/Python/test_translate.py | 11 | CODE | |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 10 | CODE | |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 12 | CODE | |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 13 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Tests/ArgmaxCoreTests/External/Hub/ConfigTests.swift | 124 | #expect(cfgArray["fake_key"].isNull()) | COMMENT |
| LOW | Examples/ServeCLIClient/Python/test_transcribe.py | 111 | api_key="dummy-key" | CODE |
| LOW | Examples/ServeCLIClient/Python/test_translate.py | 109 | api_key="dummy-key" | CODE |
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 25 | api_key="dummy-key" # Not used by local server | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Sources/WhisperKit/Core/TextDecoder.swift | 802 | let noSpeechProb: Float = 0 // TODO: implement no speech prob | CODE |
| LOW | Sources/WhisperKit/Core/Models.swift | 52 | // TODO: implement config.json and generation_config.json parsing for models | COMMENT |
| LOW | Sources/WhisperKit/Core/Configurations.swift | 233 | self.suppressTokens = suppressTokens ?? [] // nonSpeechTokens() // TODO: implement these as default | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Examples/ServeCLIClient/Python/whisperkit_client.py | 145 | def _transcribe_non_streaming(self, audio_path: str, language: str = "", model: str = "tiny", | CODE |
| LOW | scripts/generate_local_server_openapi.py | 39 | def fetch_latest_openapi_spec(): | CODE |