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.

29 lines
1.1 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 '../../core/utils/logger.dart';
/// 初始绑定,用于管理全局依赖
class InitialBinding extends Bindings {
@override
void dependencies() {
Logger.warning('InitialBinding dependencies');
// 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);
// 语音交互服务 - 使用 putAsync 确保 init 方法被调用
Get.lazyPut<VoiceInteractionService>(() => VoiceInteractionService(), fenix: true);
}
}