| 1 | /// Known and recommended Apple MLX model checkpoints. |
| 2 | class AppleMlxModelIds { |
| 3 | const AppleMlxModelIds._(); |
| 4 | |
| 5 | // LLM / Text Generation Models (Hugging Face mlx-community) |
| 6 | static const String gemma4E2b = 'mlx-community/gemma-4-e2b-it-4bit'; |
| 7 | static const String gemma4E4b = 'mlx-community/gemma-4-e4b-it-4bit'; |
| 8 | static const String gemma22b = 'mlx-community/gemma-2-2b-it-4bit'; |
| 9 | static const String llama321b = 'mlx-community/Llama-3.2-1B-Instruct-4bit'; |
| 10 | static const String llama323b = 'mlx-community/Llama-3.2-3B-Instruct-4bit'; |
| 11 | static const String smolLm2135m = 'mlx-community/SmolLM2-135M-Instruct'; |
| 12 | static const String qwen2505b = 'mlx-community/Qwen2.5-0.5B-Instruct-4bit'; |
| 13 | static const String qwen2515b = 'mlx-community/Qwen2.5-1.5B-Instruct-4bit'; |
| 14 | static const String qwen253b = 'mlx-community/Qwen2.5-3B-Instruct-4bit'; |
| 15 | |
| 16 | // Speech-To-Text (STT) Models |
| 17 | static const String parakeetTdt06b = 'mlx-community/parakeet-tdt-0.6b-v2'; |
| 18 | static const String whisperTiny = 'mlx-community/whisper-tiny-mlx'; |
| 19 | static const String whisperBase = 'mlx-community/whisper-base-mlx'; |
| 20 | static const String whisperSmall = 'mlx-community/whisper-small-mlx'; |
| 21 | |
| 22 | // Text-To-Speech (TTS) Models |
| 23 | static const String pocketTts = 'mlx-community/pocket-tts'; |
| 24 | |
| 25 | // Default PocketTTS voice IDs |
| 26 | static const List<String> defaultVoices = [ |
| 27 | 'alba', |
| 28 | 'marius', |
| 29 | 'javert', |
| 30 | 'jean', |
| 31 | ]; |
| 32 | } |
| 33 | |
| 34 | /// Configuration options for MLX speech operations. |
| 35 | class AppleMlxConfig { |
| 36 | /// Path or Hugging Face repo ID for STT model. |
| 37 | final String? sttModelId; |
| 38 | |
| 39 | /// Path or Hugging Face repo ID for TTS model. |
| 40 | final String? ttsModelId; |
| 41 | |
| 42 | /// Default voice ID to use for TTS. |
| 43 | final String defaultVoice; |
| 44 | |
| 45 | /// Maximum samples allowed in audio buffer for STT. |
| 46 | final int? maximumInputSamples; |
| 47 | |
| 48 | const AppleMlxConfig({ |
| 49 | this.sttModelId = AppleMlxModelIds.parakeetTdt06b, |
| 50 | this.ttsModelId = AppleMlxModelIds.pocketTts, |
| 51 | this.defaultVoice = 'alba', |
| 52 | this.maximumInputSamples, |
| 53 | }); |
| 54 | } |