Skip to content

Commit 9d04691

Browse files
committed
feat: Added selection options for Models and Languages
1 parent ba67c1f commit 9d04691

15 files changed

+754
-9
lines changed

lib/controllers/whisper_transcription_controller.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import 'package:ffmpeg_kit_flutter_new/ffmpeg_kit.dart';
44
import 'package:ffmpeg_kit_flutter_new/return_code.dart';
55
import 'package:get/get.dart';
66
import 'package:path_provider/path_provider.dart';
7+
import 'package:resonate/utils/constants.dart';
78
import 'package:whisper_flutter_new/whisper_flutter_new.dart';
89

910
class WhisperTranscriptionController extends GetxController {
1011
final Whisper whisper = Whisper(
11-
model: WhisperModel.base,
12+
model: currentWhisperModel.value,
1213
downloadHost: "https://huggingface.co/ggerganov/whisper.cpp/resolve/main",
1314
);
1415

lib/l10n/app_en.arb

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,70 @@
402402
"@contribute": {
403403
"description": "Label for a section encouraging users to contribute to the project."
404404
},
405+
"appPreferences": "App Preferences",
406+
"@appPreferences": {
407+
"description": "Label for the app preferences settings page."
408+
},
409+
"transcriptionModel": "Transcription Model",
410+
"@transcriptionModel": {
411+
"description": "Section title for choosing AI transcription model."
412+
},
413+
"transcriptionModelDescription": "Choose the AI model for voice transcription. Larger models are more accurate but slower and require more storage.",
414+
"@transcriptionModelDescription": {
415+
"description": "Description text explaining transcription model choices."
416+
},
417+
"whisperModelTiny": "Tiny",
418+
"@whisperModelTiny": {
419+
"description": "Name of the smallest Whisper AI model."
420+
},
421+
"whisperModelTinyDescription": "Fastest, least accurate (~39 MB)",
422+
"@whisperModelTinyDescription": {
423+
"description": "Description of the Tiny Whisper model performance and size."
424+
},
425+
"whisperModelBase": "Base",
426+
"@whisperModelBase": {
427+
"description": "Name of the base Whisper AI model."
428+
},
429+
"whisperModelBaseDescription": "Balanced speed and accuracy (~74 MB)",
430+
"@whisperModelBaseDescription": {
431+
"description": "Description of the Base Whisper model performance and size."
432+
},
433+
"whisperModelSmall": "Small",
434+
"@whisperModelSmall": {
435+
"description": "Name of the small Whisper AI model."
436+
},
437+
"whisperModelSmallDescription": "Good accuracy, slower (~244 MB)",
438+
"@whisperModelSmallDescription": {
439+
"description": "Description of the Small Whisper model performance and size."
440+
},
441+
"whisperModelMedium": "Medium",
442+
"@whisperModelMedium": {
443+
"description": "Name of the medium Whisper AI model."
444+
},
445+
"whisperModelMediumDescription": "High accuracy, slower (~769 MB)",
446+
"@whisperModelMediumDescription": {
447+
"description": "Description of the Medium Whisper model performance and size."
448+
},
449+
"whisperModelLargeV1": "Large V1",
450+
"@whisperModelLargeV1": {
451+
"description": "Name of the large V1 Whisper AI model."
452+
},
453+
"whisperModelLargeV1Description": "Most accurate, slowest (~1.55 GB)",
454+
"@whisperModelLargeV1Description": {
455+
"description": "Description of the Large V1 Whisper model performance and size."
456+
},
457+
"whisperModelLargeV2": "Large V2",
458+
"@whisperModelLargeV2": {
459+
"description": "Name of the large V2 Whisper AI model."
460+
},
461+
"whisperModelLargeV2Description": "Improved large model with higher accuracy (~1.55 GB)",
462+
"@whisperModelLargeV2Description": {
463+
"description": "Description of the Large V2 Whisper model performance and size."
464+
},
465+
"modelDownloadInfo": "Models are downloaded when first used. We recommend using Base, Small, or Medium. Large models require very high-end devices.",
466+
"@modelDownloadInfo": {
467+
"description": "Information message about model download."
468+
},
405469
"logOut": "Log out",
406470
"@logOut": {
407471
"description": "Button text to log the user out of their account."

lib/l10n/app_hi.arb

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,70 @@
402402
"@contribute": {
403403
"description": "Label for a section encouraging users to contribute to the project."
404404
},
405+
"appPreferences": "ऐप प्राथमिकताएं",
406+
"@appPreferences": {
407+
"description": "Label for the app preferences settings page."
408+
},
409+
"transcriptionModel": "ट्रांसक्रिप्शन मॉडल",
410+
"@transcriptionModel": {
411+
"description": "Section title for choosing AI transcription model."
412+
},
413+
"transcriptionModelDescription": "वॉयस ट्रांसक्रिप्शन के लिए AI मॉडल चुनें। बड़े मॉडल अधिक सटीक हैं लेकिन धीमे हैं और अधिक स्टोरेज की आवश्यकता होती है।",
414+
"@transcriptionModelDescription": {
415+
"description": "Description text explaining transcription model choices."
416+
},
417+
"whisperModelTiny": "टाइनी",
418+
"@whisperModelTiny": {
419+
"description": "Name of the smallest Whisper AI model."
420+
},
421+
"whisperModelTinyDescription": "सबसे तेज़, कम सटीक (~39 MB)",
422+
"@whisperModelTinyDescription": {
423+
"description": "Description of the Tiny Whisper model performance and size."
424+
},
425+
"whisperModelBase": "बेस",
426+
"@whisperModelBase": {
427+
"description": "Name of the base Whisper AI model."
428+
},
429+
"whisperModelBaseDescription": "संतुलित गति और सटीकता (~74 MB)",
430+
"@whisperModelBaseDescription": {
431+
"description": "Description of the Base Whisper model performance and size."
432+
},
433+
"whisperModelSmall": "स्मॉल",
434+
"@whisperModelSmall": {
435+
"description": "Name of the small Whisper AI model."
436+
},
437+
"whisperModelSmallDescription": "अच्छी सटीकता, धीमा (~244 MB)",
438+
"@whisperModelSmallDescription": {
439+
"description": "Description of the Small Whisper model performance and size."
440+
},
441+
"whisperModelMedium": "मीडियम",
442+
"@whisperModelMedium": {
443+
"description": "Name of the medium Whisper AI model."
444+
},
445+
"whisperModelMediumDescription": "उच्च सटीकता, धीमा (~769 MB)",
446+
"@whisperModelMediumDescription": {
447+
"description": "Description of the Medium Whisper model performance and size."
448+
},
449+
"whisperModelLargeV1": "लार्ज V1",
450+
"@whisperModelLargeV1": {
451+
"description": "Name of the large V1 Whisper AI model."
452+
},
453+
"whisperModelLargeV1Description": "सबसे अधिक सटीक, सबसे धीमा (~1.55 GB)",
454+
"@whisperModelLargeV1Description": {
455+
"description": "Description of the Large V1 Whisper model performance and size."
456+
},
457+
"whisperModelLargeV2": "लार्ज V2",
458+
"@whisperModelLargeV2": {
459+
"description": "Name of the large V2 Whisper AI model."
460+
},
461+
"whisperModelLargeV2Description": "उच्च सटीकता के साथ बेहतर बड़ा मॉडल (~1.55 GB)",
462+
"@whisperModelLargeV2Description": {
463+
"description": "Description of the Large V2 Whisper model performance and size."
464+
},
465+
"modelDownloadInfo": "मॉडल पहली बार उपयोग करने पर डाउनलोड हो जाते हैं। हम बेस, स्मॉल या मीडियम का उपयोग करने की सिफारिश करते हैं। बड़े मॉडल के लिए बहुत उच्च अंत उपकरणों की आवश्यकता होती है।",
466+
"@modelDownloadInfo": {
467+
"description": "Information message about model download."
468+
},
405469
"logOut": "लॉग आउट",
406470
"@logOut": {
407471
"description": "Button text to log the user out of their account."

lib/l10n/app_localizations.dart

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,102 @@ abstract class AppLocalizations {
694694
/// **'Contribute'**
695695
String get contribute;
696696

697+
/// Label for the app preferences settings page.
698+
///
699+
/// In en, this message translates to:
700+
/// **'App Preferences'**
701+
String get appPreferences;
702+
703+
/// Section title for choosing AI transcription model.
704+
///
705+
/// In en, this message translates to:
706+
/// **'Transcription Model'**
707+
String get transcriptionModel;
708+
709+
/// Description text explaining transcription model choices.
710+
///
711+
/// In en, this message translates to:
712+
/// **'Choose the AI model for voice transcription. Larger models are more accurate but slower and require more storage.'**
713+
String get transcriptionModelDescription;
714+
715+
/// Name of the smallest Whisper AI model.
716+
///
717+
/// In en, this message translates to:
718+
/// **'Tiny'**
719+
String get whisperModelTiny;
720+
721+
/// Description of the Tiny Whisper model performance and size.
722+
///
723+
/// In en, this message translates to:
724+
/// **'Fastest, least accurate (~39 MB)'**
725+
String get whisperModelTinyDescription;
726+
727+
/// Name of the base Whisper AI model.
728+
///
729+
/// In en, this message translates to:
730+
/// **'Base'**
731+
String get whisperModelBase;
732+
733+
/// Description of the Base Whisper model performance and size.
734+
///
735+
/// In en, this message translates to:
736+
/// **'Balanced speed and accuracy (~74 MB)'**
737+
String get whisperModelBaseDescription;
738+
739+
/// Name of the small Whisper AI model.
740+
///
741+
/// In en, this message translates to:
742+
/// **'Small'**
743+
String get whisperModelSmall;
744+
745+
/// Description of the Small Whisper model performance and size.
746+
///
747+
/// In en, this message translates to:
748+
/// **'Good accuracy, slower (~244 MB)'**
749+
String get whisperModelSmallDescription;
750+
751+
/// Name of the medium Whisper AI model.
752+
///
753+
/// In en, this message translates to:
754+
/// **'Medium'**
755+
String get whisperModelMedium;
756+
757+
/// Description of the Medium Whisper model performance and size.
758+
///
759+
/// In en, this message translates to:
760+
/// **'High accuracy, slower (~769 MB)'**
761+
String get whisperModelMediumDescription;
762+
763+
/// Name of the large V1 Whisper AI model.
764+
///
765+
/// In en, this message translates to:
766+
/// **'Large V1'**
767+
String get whisperModelLargeV1;
768+
769+
/// Description of the Large V1 Whisper model performance and size.
770+
///
771+
/// In en, this message translates to:
772+
/// **'Most accurate, slowest (~1.55 GB)'**
773+
String get whisperModelLargeV1Description;
774+
775+
/// Name of the large V2 Whisper AI model.
776+
///
777+
/// In en, this message translates to:
778+
/// **'Large V2'**
779+
String get whisperModelLargeV2;
780+
781+
/// Description of the Large V2 Whisper model performance and size.
782+
///
783+
/// In en, this message translates to:
784+
/// **'Improved large model with higher accuracy (~1.55 GB)'**
785+
String get whisperModelLargeV2Description;
786+
787+
/// Information message about model download.
788+
///
789+
/// In en, this message translates to:
790+
/// **'Models are downloaded when first used. We recommend using Base, Small, or Medium. Large models require very high-end devices.'**
791+
String get modelDownloadInfo;
792+
697793
/// Button text to log the user out of their account.
698794
///
699795
/// In en, this message translates to:

lib/l10n/app_localizations_en.dart

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,59 @@ class AppLocalizationsEn extends AppLocalizations {
317317
@override
318318
String get contribute => 'Contribute';
319319

320+
@override
321+
String get appPreferences => 'App Preferences';
322+
323+
@override
324+
String get transcriptionModel => 'Transcription Model';
325+
326+
@override
327+
String get transcriptionModelDescription =>
328+
'Choose the AI model for voice transcription. Larger models are more accurate but slower and require more storage.';
329+
330+
@override
331+
String get whisperModelTiny => 'Tiny';
332+
333+
@override
334+
String get whisperModelTinyDescription => 'Fastest, least accurate (~39 MB)';
335+
336+
@override
337+
String get whisperModelBase => 'Base';
338+
339+
@override
340+
String get whisperModelBaseDescription =>
341+
'Balanced speed and accuracy (~74 MB)';
342+
343+
@override
344+
String get whisperModelSmall => 'Small';
345+
346+
@override
347+
String get whisperModelSmallDescription => 'Good accuracy, slower (~244 MB)';
348+
349+
@override
350+
String get whisperModelMedium => 'Medium';
351+
352+
@override
353+
String get whisperModelMediumDescription => 'High accuracy, slower (~769 MB)';
354+
355+
@override
356+
String get whisperModelLargeV1 => 'Large V1';
357+
358+
@override
359+
String get whisperModelLargeV1Description =>
360+
'Most accurate, slowest (~1.55 GB)';
361+
362+
@override
363+
String get whisperModelLargeV2 => 'Large V2';
364+
365+
@override
366+
String get whisperModelLargeV2Description =>
367+
'Improved large model with higher accuracy (~1.55 GB)';
368+
369+
@override
370+
String get modelDownloadInfo =>
371+
'Models are downloaded when first used. We recommend using Base, Small, or Medium. Large models require very high-end devices.';
372+
320373
@override
321374
String get logOut => 'Log out';
322375

lib/l10n/app_localizations_gu.dart

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,59 @@ class AppLocalizationsGu extends AppLocalizations {
316316
@override
317317
String get contribute => 'યોગદાન આપો';
318318

319+
@override
320+
String get appPreferences => 'App Preferences';
321+
322+
@override
323+
String get transcriptionModel => 'Transcription Model';
324+
325+
@override
326+
String get transcriptionModelDescription =>
327+
'Choose the AI model for voice transcription. Larger models are more accurate but slower and require more storage.';
328+
329+
@override
330+
String get whisperModelTiny => 'Tiny';
331+
332+
@override
333+
String get whisperModelTinyDescription => 'Fastest, least accurate (~39 MB)';
334+
335+
@override
336+
String get whisperModelBase => 'Base';
337+
338+
@override
339+
String get whisperModelBaseDescription =>
340+
'Balanced speed and accuracy (~74 MB)';
341+
342+
@override
343+
String get whisperModelSmall => 'Small';
344+
345+
@override
346+
String get whisperModelSmallDescription => 'Good accuracy, slower (~244 MB)';
347+
348+
@override
349+
String get whisperModelMedium => 'Medium';
350+
351+
@override
352+
String get whisperModelMediumDescription => 'High accuracy, slower (~769 MB)';
353+
354+
@override
355+
String get whisperModelLargeV1 => 'Large V1';
356+
357+
@override
358+
String get whisperModelLargeV1Description =>
359+
'Most accurate, slowest (~1.55 GB)';
360+
361+
@override
362+
String get whisperModelLargeV2 => 'Large V2';
363+
364+
@override
365+
String get whisperModelLargeV2Description =>
366+
'Improved large model with higher accuracy (~1.55 GB)';
367+
368+
@override
369+
String get modelDownloadInfo =>
370+
'Models are downloaded when first used. We recommend using Base, Small, or Medium. Large models require very high-end devices.';
371+
319372
@override
320373
String get logOut => 'લોગ આઉટ';
321374

0 commit comments

Comments
 (0)