├── android
├── whisperkit
│ ├── .gitignore
│ ├── consumer-rules.pro
│ ├── src
│ │ ├── main
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── argmaxinc
│ │ │ │ │ └── whisperkit
│ │ │ │ │ ├── util
│ │ │ │ │ ├── MessageProcessor.kt
│ │ │ │ │ └── SegmentTextOnlyMessageProcessor.kt
│ │ │ │ │ ├── NativeTest.kt
│ │ │ │ │ ├── WhisperKitException.kt
│ │ │ │ │ ├── ExperimentalWhisperKit.kt
│ │ │ │ │ ├── network
│ │ │ │ │ └── ArgmaxModelDownloader.kt
│ │ │ │ │ ├── huggingface
│ │ │ │ │ ├── HuggingFaceApiConfig.kt
│ │ │ │ │ ├── Repo.kt
│ │ │ │ │ ├── HuggingFaceLogger.kt
│ │ │ │ │ ├── KtorHuggingFaceClient.kt
│ │ │ │ │ ├── ModelInfo.kt
│ │ │ │ │ └── HuggingFaceApi.kt
│ │ │ │ │ └── WhisperKitImpl.kt
│ │ │ └── AndroidManifest.xml
│ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── argmaxinc
│ │ │ └── whisperkit
│ │ │ └── util
│ │ │ └── SegmentTextOnlyMessageProcessorTest.kt
│ ├── proguard-rules.pro
│ ├── detekt-baseline.xml
│ └── build.gradle.kts
├── examples
│ └── WhisperAX
│ │ ├── .gitignore
│ │ ├── src
│ │ └── main
│ │ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── themes.xml
│ │ │ │ └── styles.xml
│ │ │ ├── drawable
│ │ │ │ ├── logo.png
│ │ │ │ ├── ic_launcher_foreground.xml
│ │ │ │ └── ic_launcher_background.xml
│ │ │ ├── values-night
│ │ │ │ ├── colors.xml
│ │ │ │ └── themes.xml
│ │ │ └── layout
│ │ │ │ └── activity_main.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── argmaxinc
│ │ │ │ └── whisperax
│ │ │ │ ├── AudioDecoderCallbacks.kt
│ │ │ │ ├── Typography.kt
│ │ │ │ ├── WhisperAppTheme.kt
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── MainScreenContentImpl.kt
│ │ │ │ └── PCMDecoder.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── proguard-rules.pro
│ │ └── build.gradle.kts
├── .gitignore
└── config
│ └── detekt.yml
├── .clang-format
├── test
├── ted_60.m4a
├── jfk_441khz.m4a
├── requirements.txt
├── ENVIRONMENT.json
└── test_build_all.sh
├── gradle
├── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
└── libs.versions.toml
├── scripts
├── run_on_android.sh
├── copy_libraries.sh
├── build_tokenizers.sh
├── build_test.sh
├── build_ffmpeg.sh
├── Dockerfile
├── build_tensorflow.sh
├── adb_push.sh
├── dev_env.sh
├── build.sh
└── download_models.sh
├── cpp
└── src
│ ├── WhisperKitTranscriptionResult.hpp
│ ├── Core
│ ├── backend_class.hpp
│ ├── tflite_msg.hpp
│ └── DelegateInterface.hpp
│ ├── Models
│ ├── tflite_gpu_model.hpp
│ ├── tflite_qnn_model.hpp
│ ├── tflite_gpu_model.cpp
│ ├── tflite_model.hpp
│ ├── tflite_qnn_model.cpp
│ └── TextDecoder.hpp
│ ├── WhisperKitTranscriptionResult.cpp
│ ├── Text
│ ├── post_proc.hpp
│ ├── Tokenizer.h
│ ├── Tokenizer.cpp
│ └── post_proc.cpp
│ ├── WhisperKitPipeline.hpp
│ ├── TranscribeTask.hpp
│ ├── WhisperKitPipeline.cpp
│ ├── WhisperKitConfiguration.hpp
│ ├── Audio
│ └── audio_input.hpp
│ └── WhisperKitConfiguration.cpp
├── .gitignore
├── settings.gradle.kts
├── .github
├── pull_request_template.md
└── workflows
│ └── pr-checks.yml
├── LICENSE
├── gradle.properties
├── .githooks
└── pre-commit
├── cli
├── whisperkit_cli.h
└── whisperkit_cli.cpp
├── jni
└── whisperkit_jni.h
├── gradlew.bat
├── Makefile
├── CMakeLists.txt
└── gradlew
/android/whisperkit/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/android/whisperkit/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/android/examples/WhisperAX/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/.clang-format:
--------------------------------------------------------------------------------
1 | BasedOnStyle: Google
2 | IndentWidth: 4
3 | ColumnLimit: 120
4 |
--------------------------------------------------------------------------------
/test/ted_60.m4a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/argmaxinc/WhisperKitAndroid/HEAD/test/ted_60.m4a
--------------------------------------------------------------------------------
/test/jfk_441khz.m4a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/argmaxinc/WhisperKitAndroid/HEAD/test/jfk_441khz.m4a
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/argmaxinc/WhisperKitAndroid/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/test/requirements.txt:
--------------------------------------------------------------------------------
1 | evaluate==0.4.3
2 | huggingface_hub==0.26.2
3 | openai_whisper==20240930
4 | jiwer==3.0.5
5 | docker==7.1.0
6 |
--------------------------------------------------------------------------------
/android/examples/WhisperAX/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | WhisperAX
3 |
--------------------------------------------------------------------------------
/android/examples/WhisperAX/src/main/res/drawable/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/argmaxinc/WhisperKitAndroid/HEAD/android/examples/WhisperAX/src/main/res/drawable/logo.png
--------------------------------------------------------------------------------
/android/examples/WhisperAX/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 48dp
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue May 06 17:09:48 PDT 2025
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 |
--------------------------------------------------------------------------------
/scripts/run_on_android.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | # Set up environment variables for the Android session
4 | export PATH=/data/local/tmp/bin:$PATH
5 | export LD_LIBRARY_PATH=/data/local/tmp/lib
6 |
7 | whisperkit-cli transcribe --model-path /sdcard/argmax/tflite/models/openai_whisper-tiny --audio-path /sdcard/argmax/tflite/inputs/jfk_441khz.m4a
8 |
--------------------------------------------------------------------------------
/android/whisperkit/src/main/java/com/argmaxinc/whisperkit/util/MessageProcessor.kt:
--------------------------------------------------------------------------------
1 | package com.argmaxinc.whisperkit.util
2 |
3 | import com.argmaxinc.whisperkit.TranscriptionResult
4 |
5 | /**
6 | * Processor to convert raw model output Strings into [TranscriptionResult]
7 | */
8 | internal interface MessageProcessor {
9 | fun process(rawMsg: String): TranscriptionResult
10 | }
11 |
--------------------------------------------------------------------------------
/android/examples/WhisperAX/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #4542F4
4 | #4542F4
5 | #4542F4
6 | #4542F4
7 | #FFFFFF
8 | #000000
9 |
--------------------------------------------------------------------------------
/android/examples/WhisperAX/src/main/res/values-night/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #4542F4
4 | #4542F4
5 | #4542F4
6 | #4542F4
7 | #FFFFFF
8 | #FFFFFF
9 |
--------------------------------------------------------------------------------
/android/examples/WhisperAX/src/main/java/com/argmaxinc/whisperax/AudioDecoderCallbacks.kt:
--------------------------------------------------------------------------------
1 | // For licensing see accompanying LICENSE.md file.
2 | // Copyright © 2025 Argmax, Inc. All rights reserved.
3 | package com.argmaxinc.whisperax
4 |
5 | interface AudioDecoderCallbacks {
6 | fun onAudioFormat(freq: Int, ch: Int, dur: Long)
7 | fun onOutputBuffer(pcmbuffer: ByteArray, timestamp: Long)
8 | fun onDecodeClose()
9 | fun onEndOfStream()
10 | }
11 |
--------------------------------------------------------------------------------
/android/whisperkit/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/cpp/src/WhisperKitTranscriptionResult.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | struct whisperkit_transcription_result_t {
6 | public:
7 | whisperkit_transcription_result_t();
8 | ~whisperkit_transcription_result_t();
9 |
10 | void set_transcription(const std::string& transcription);
11 | std::string get_transcription() const;
12 | std::string get_chunk_transcription() const;
13 |
14 | private:
15 | std::string curr_transcription;
16 | std::string all_transcription;
17 | };
--------------------------------------------------------------------------------
/android/whisperkit/src/main/java/com/argmaxinc/whisperkit/NativeTest.kt:
--------------------------------------------------------------------------------
1 | package com.argmaxinc.whisperkit
2 |
3 | /**
4 | * A simple class to test native code editing
5 | */
6 | class NativeTest {
7 |
8 | /**
9 | * A native method that returns a string from C++
10 | */
11 | external fun stringFromJNI(): String
12 |
13 | companion object {
14 | // Used to load the native library on application startup
15 | init {
16 | System.loadLibrary("whisperkit_jni")
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/android/examples/WhisperAX/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/cpp/src/Core/backend_class.hpp:
--------------------------------------------------------------------------------
1 | // For licensing see accompanying LICENSE file.
2 | // Copyright © 2024 Argmax, Inc. All rights reserved.
3 | #pragma once
4 |
5 | enum ComputeBackend {
6 | None = 0,
7 | CPU = 1,
8 | GPU = 2,
9 | NPU = 3,
10 | };
11 |
12 | #if QNN_DELEGATE
13 | #include "tflite_qnn_model.hpp"
14 | #define MODEL_SUPER_CLASS TFLiteQNN
15 | #else
16 |
17 | #if GPU_DELEGATE
18 |
19 | #include "tflite_gpu_model.hpp"
20 | #define MODEL_SUPER_CLASS TFLiteGPU
21 |
22 | #else
23 |
24 | #include "tflite_model.hpp"
25 | #define MODEL_SUPER_CLASS TFLiteModel
26 |
27 | #endif
28 | #endif
29 |
--------------------------------------------------------------------------------
/android/whisperkit/src/main/java/com/argmaxinc/whisperkit/WhisperKitException.kt:
--------------------------------------------------------------------------------
1 | package com.argmaxinc.whisperkit
2 |
3 | /**
4 | * Exception thrown by WhisperKit when an error occurs during model operations.
5 | * This exception can be thrown during:
6 | * - Model loading and initialization
7 | * - Transcription processing
8 | * - Resource cleanup
9 | * - Invalid configuration
10 | *
11 | * @param message A detailed description of the error
12 | * @param cause The underlying exception that caused this error, if any
13 | */
14 | class WhisperKitException(message: String, cause: Throwable? = null) : Exception(message, cause)
15 |
--------------------------------------------------------------------------------
/android/examples/WhisperAX/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore build folders
2 | .source/
3 | build/
4 | inputs/
5 | models/
6 | cache/
7 | external/
8 | test/dataset/
9 | test/logs/
10 | android/examples/WhisperAX/release/
11 | .idea
12 |
13 | # Never exclude src files
14 | !cpp/**
15 | !cli/**
16 |
17 | # MacOS specific
18 | .DS_Store
19 | **/.DS_Store
20 |
21 | # Binary files
22 | *.so
23 | *.bin
24 | *.apk
25 | *.aar
26 | *.jar
27 | *.tflite
28 |
29 | # Gradle and Android
30 | .gradle/
31 | local.properties
32 | **/build/
33 | captures/
34 | .externalNativeBuild/
35 | .cxx/
36 |
37 | # Python
38 | __pycache__/
39 | *.py[cod]
40 | *$py.class
41 | *.so
42 | .Python
43 | env/
44 | venv/
45 | ENV/
--------------------------------------------------------------------------------
/android/whisperkit/src/main/java/com/argmaxinc/whisperkit/ExperimentalWhisperKit.kt:
--------------------------------------------------------------------------------
1 | package com.argmaxinc.whisperkit
2 |
3 | import kotlin.RequiresOptIn
4 | import kotlin.annotation.AnnotationTarget
5 |
6 | /**
7 | * Marks the WhisperKit API as experimental.
8 | * This annotation indicates that the API is still in development and may change in future releases.
9 | */
10 | @RequiresOptIn(
11 | level = RequiresOptIn.Level.WARNING,
12 | message = "This API is experimental and may change in future releases. Use with caution in production code.",
13 | )
14 | @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
15 | annotation class ExperimentalWhisperKit
16 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | google {
4 | content {
5 | includeGroupByRegex("com\\.android.*")
6 | includeGroupByRegex("com\\.google.*")
7 | includeGroupByRegex("androidx.*")
8 | }
9 | }
10 | mavenCentral()
11 | gradlePluginPortal()
12 | }
13 | }
14 | dependencyResolutionManagement {
15 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
16 | repositories {
17 | google()
18 | mavenCentral()
19 | }
20 | }
21 |
22 | rootProject.name = "WhisperKit"
23 | include(":android:examples:WhisperAX")
24 | include(":android:whisperkit")
25 |
--------------------------------------------------------------------------------
/cpp/src/Models/tflite_gpu_model.hpp:
--------------------------------------------------------------------------------
1 | // For licensing see accompanying LICENSE file.
2 | // Copyright © 2024 Argmax, Inc. All rights reserved.
3 | #pragma once
4 |
5 | #if GPU_DELEGATE
6 | #include "tensorflow/lite/delegates/gpu/delegate.h"
7 | #include "tflite_model.hpp"
8 |
9 | class TFLiteGPU : public TFLiteModel {
10 | public:
11 | TFLiteGPU(const std::string& name);
12 | virtual ~TFLiteGPU();
13 |
14 | virtual bool initialize(std::string model_path, std::string lib_dir, std::string cache_path, int backend,
15 | bool debug = false);
16 | virtual void uninitialize();
17 |
18 | protected:
19 | virtual bool create_interpreter_delegate(std::string model_path);
20 | };
21 | #endif
22 |
--------------------------------------------------------------------------------
/test/ENVIRONMENT.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "Environment variables for WhisperKitAndroid project",
3 | "test": {
4 | "hf_repo": "argmaxinc/whisperkit-test-data",
5 | "datasets": ["librispeech-10mins", "earnings22-10mins"],
6 | "output_file": "output.json",
7 | "delegate_file": "delegate.log",
8 | "android_dir": "/sdcard/argmax/tflite",
9 | "executable": "whisperkit-cli",
10 | "metadata": "metadata.json"
11 | },
12 | "docker": {
13 | "image": "android-ndk-qnn-tensorflow-image",
14 | "rootdir": "/src/AXIE",
15 | "container": "axie_tflite"
16 | },
17 | "audio": {
18 | "extensions": [".mp3", ".m4a", ".ogg", ".flac", ".aac", ".wav"],
19 | "local_dir": "inputs"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | ## Description
2 | Describe what this PR does and why it's needed. Explain any context or dependencies if applicable.
3 | If a related issue exists, please provide a link.
4 |
5 | ## Type of Change
6 | - [ ] Bug fix 🐛
7 | - [ ] New feature 🚀
8 | - [ ] Refactor 🔄
9 | - [ ] Documentation update 📖
10 | - [ ] Other (please describe)
11 |
12 | ## Test Plan
13 | - [ ] I have run `bash test/test_build_all.sh` and it ran successfully
14 | - [ ] I have tested this change on all relevant platforms.
15 |
16 | ## Checklist
17 | - [ ] My code follows the project's style guidelines.
18 | - [ ] I have updated relevant documentation (if applicable).
19 | - [ ] I have added appropriate tests (if applicable).
20 | - [ ] I have self-reviewed my code before requesting review.
21 |
--------------------------------------------------------------------------------
/cpp/src/Models/tflite_qnn_model.hpp:
--------------------------------------------------------------------------------
1 | // For licensing see accompanying LICENSE file.
2 | // Copyright © 2024 Argmax, Inc. All rights reserved.
3 | #pragma once
4 |
5 | #if QNN_DELEGATE
6 | #include "QnnTFLiteDelegate.h"
7 | #include "tensorflow/lite/delegates/gpu/delegate.h"
8 | #include "tflite_model.hpp"
9 |
10 | class TFLiteQNN : public TFLiteModel {
11 | public:
12 | TFLiteQNN(const std::string& name);
13 | virtual ~TFLiteQNN();
14 |
15 | virtual bool initialize(std::string model_path, std::string lib_dir, std::string cache_path,
16 | int backend = kHtpBackend, bool debug = false);
17 | virtual void uninitialize();
18 |
19 | protected:
20 | TfLiteQnnDelegateOptions _options;
21 |
22 | virtual bool create_interpreter_delegate(std::string model_path);
23 | };
24 | #endif
25 |
--------------------------------------------------------------------------------
/android/whisperkit/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/cpp/src/WhisperKitTranscriptionResult.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include "WhisperKitTranscriptionResult.hpp"
3 |
4 | whisperkit_transcription_result_t::whisperkit_transcription_result_t() {
5 | curr_transcription.clear();
6 | all_transcription.clear();
7 | }
8 |
9 | whisperkit_transcription_result_t::~whisperkit_transcription_result_t() {
10 | curr_transcription.clear();
11 | all_transcription.clear();
12 | }
13 |
14 | void whisperkit_transcription_result_t::set_transcription(const std::string& input_transcription) {
15 | curr_transcription = std::move(input_transcription);
16 | all_transcription.append(curr_transcription);
17 | }
18 |
19 | std::string whisperkit_transcription_result_t::get_chunk_transcription() const { return curr_transcription; }
20 |
21 | std::string whisperkit_transcription_result_t::get_transcription() const { return all_transcription; }
--------------------------------------------------------------------------------
/android/examples/WhisperAX/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/android/whisperkit/detekt-baseline.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | LargeClass:ArgmaxModelDownloaderImplTest.kt$ArgmaxModelDownloaderImplTest
6 | LongMethod:KtorHuggingFaceApiImpl.kt$KtorHuggingFaceApiImpl$private suspend fun FlowCollector<Progress>.downloadFilesWithRetry( from: Repo, revision: String, files: List<String>, baseDir: File, )
7 | ThrowsCount:WhisperKit.kt$WhisperKit.Builder$@Throws(WhisperKitException::class) fun build(): WhisperKit
8 | TooGenericExceptionCaught:KtorHuggingFaceApiImpl.kt$KtorHuggingFaceApiImpl$e: Exception
9 | TooGenericExceptionCaught:WhisperKitImpl.kt$WhisperKitImpl$e: Exception
10 | UnusedParameter:WhisperKitImpl.kt$WhisperKitImpl$timestamp: Float
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android/examples/WhisperAX/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
13 |
14 |
15 |
19 |
--------------------------------------------------------------------------------
/android/whisperkit/src/main/java/com/argmaxinc/whisperkit/network/ArgmaxModelDownloader.kt:
--------------------------------------------------------------------------------
1 | // For licensing see accompanying LICENSE.md file.
2 | // Copyright © 2025 Argmax, Inc. All rights reserved.
3 |
4 | package com.argmaxinc.whisperkit.network
5 |
6 | import com.argmaxinc.whisperkit.huggingface.HuggingFaceApi
7 | import com.argmaxinc.whisperkit.huggingface.HuggingFaceApi.Progress
8 | import kotlinx.coroutines.flow.Flow
9 | import java.io.File
10 |
11 | interface ArgmaxModelDownloader {
12 | /**
13 | * Downloads all model files for a specific model variant.
14 | *
15 | * @param model The model to download
16 | * @param variant The specific variant to download
17 | * @param root The root directory where model files will be downloaded
18 | * @return A Flow of [HuggingFaceApi.Progress] that reports download progress
19 | */
20 | fun download(
21 | model: ArgmaxModel,
22 | variant: String,
23 | root: File,
24 | ): Flow