|
8 | 8 | import Foundation |
9 | 9 | import SwiftUI |
10 | 10 |
|
| 11 | +// Import WhisperModels |
| 12 | +import Foundation |
| 13 | + |
11 | 14 | class OnboardingViewModel: ObservableObject { |
12 | 15 | @Published var selectedLanguage: String { |
13 | 16 | didSet { |
@@ -455,7 +458,7 @@ struct PermissionsStepView: View { |
455 | 458 |
|
456 | 459 | // Microphone Permission |
457 | 460 | PermissionRowView( |
458 | | - icon: Aline Wright"mic.fill", |
| 461 | + icon: "mic.fill", |
459 | 462 | title: "Microphone", |
460 | 463 | description: "For recording audio to transcribe", |
461 | 464 | isGranted: permissionsManager.isMicrophonePermissionGranted, |
@@ -997,64 +1000,6 @@ struct OnboardingSecondaryButtonStyle: ButtonStyle { |
997 | 1000 | } |
998 | 1001 | } |
999 | 1002 |
|
1000 | | -// MARK: - Existing Models (keeping the same data structure) |
1001 | | - |
1002 | | -struct DownloadableModel: Identifiable { |
1003 | | - let id = UUID() |
1004 | | - let name: String |
1005 | | - var isDownloaded: Bool |
1006 | | - let url: URL |
1007 | | - let size: Int |
1008 | | - var speedRate: Int |
1009 | | - var accuracyRate: Int |
1010 | | - var downloadProgress: Double = 0.0 |
1011 | | - |
1012 | | - var sizeString: String { |
1013 | | - let formatter = ByteCountFormatter() |
1014 | | - formatter.allowedUnits = [.useMB, .useGB] |
1015 | | - formatter.countStyle = .file |
1016 | | - formatter.includesUnit = true |
1017 | | - formatter.isAdaptive = true |
1018 | | - return formatter.string(fromByteCount: Int64(size) * 1000000) |
1019 | | - } |
1020 | | - |
1021 | | - init(name: String, isDownloaded: Bool, url: URL, size: Int, speedRate: Int, accuracyRate: Int) { |
1022 | | - self.name = name |
1023 | | - self.isDownloaded = isDownloaded |
1024 | | - self.url = url |
1025 | | - self.size = size |
1026 | | - self.speedRate = speedRate |
1027 | | - self.accuracyRate = accuracyRate |
1028 | | - } |
1029 | | -} |
1030 | | - |
1031 | | -let availableModels = [ |
1032 | | - DownloadableModel( |
1033 | | - name: "Turbo V3 large", |
1034 | | - isDownloaded: false, |
1035 | | - url: URL(string: "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-turbo.bin?download=true")!, |
1036 | | - size: 1624, |
1037 | | - speedRate: 60, |
1038 | | - accuracyRate: 100 |
1039 | | - ), |
1040 | | - DownloadableModel( |
1041 | | - name: "Turbo V3 medium", |
1042 | | - isDownloaded: false, |
1043 | | - url: URL(string: "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-turbo-q8_0.bin?download=true")!, |
1044 | | - size: 874, |
1045 | | - speedRate: 70, |
1046 | | - accuracyRate: 70 |
1047 | | - ), |
1048 | | - DownloadableModel( |
1049 | | - name: "Turbo V3 small", |
1050 | | - isDownloaded: false, |
1051 | | - url: URL(string: "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-turbo-q5_0.bin?download=true")!, |
1052 | | - size: 574, |
1053 | | - speedRate: 100, |
1054 | | - accuracyRate: 60 |
1055 | | - ) |
1056 | | -] |
1057 | | - |
1058 | 1003 | #Preview { |
1059 | 1004 | OnboardingView() |
1060 | 1005 | } |
0 commit comments