You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.4 KiB
38 lines
1.4 KiB
import 'package:get/get.dart';
|
|
import '../../data/services/azure_asr_service.dart';
|
|
import '../../data/services/azure_tts_service.dart';
|
|
import '../../data/services/chat_history_service.dart';
|
|
import '../../data/services/volcano_translation_service.dart';
|
|
import '../../data/services/voice_interaction_service.dart';
|
|
import '../../data/services/language_manager.dart';
|
|
import '../../data/services/volcano_ai_service.dart';
|
|
import '../../core/utils/logger.dart';
|
|
|
|
/// 初始绑定,用于管理全局依赖
|
|
class InitialBinding extends Bindings {
|
|
@override
|
|
void dependencies() {
|
|
Logger.warning('InitialBinding dependencies');
|
|
|
|
// 语言管理器(需要最先初始化)
|
|
Get.put<LanguageManager>(LanguageManager(), permanent: true);
|
|
|
|
// Azure 语音识别服务
|
|
Get.lazyPut<AzureAsrService>(() => AzureAsrService(), fenix: true);
|
|
|
|
// Azure TTS 服务 (原生实现)
|
|
Get.lazyPut<AzureTtsService>(() => AzureTtsService(), fenix: true);
|
|
|
|
// 历史记录服务
|
|
Get.lazyPut<ChatHistoryService>(() => ChatHistoryService(), fenix: true);
|
|
|
|
// 火山翻译服务
|
|
Get.lazyPut<VolcanoTranslationService>(() => VolcanoTranslationService(), fenix: true);
|
|
|
|
// 火山AI服务
|
|
Get.lazyPut<VolcanoAIService>(() => VolcanoAIService(), fenix: true);
|
|
|
|
// 注意:VoiceInteractionService 在 HomeController 中初始化
|
|
Get.lazyPut<VoiceInteractionService>(() => VoiceInteractionService(), fenix: true);
|
|
}
|
|
}
|