zyc 689fa8936b Integrate Volcengine realtime voice + Live2D mouth driving
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:39:23 +08:00

28 lines
1.1 KiB
Objective-C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#import <Flutter/Flutter.h>
/// 桥接 SpeechEngineDialogToB火山端到端实时语音对话 SDK到 Flutter。
///
/// MethodChannel: avatar_flutter_app/speech_engine
/// - init(params) 初始化引擎与配置参数
/// - start() 按住说话SyncStop + StartEngine
/// - finishTalking() 抬起按钮:通知 SDK 用户讲完
/// - cancelCurrentDialog() 打断 AI 当前回复
/// - sayHello(content) 让 AI 主动说一句开场白
/// - stop() 关闭会话
/// - destroy() 销毁引擎释放资源
///
/// EventChannel: avatar_flutter_app/speech_events
/// 推送统一字典 {"type": "...", ...payload}
/// - engine_start / engine_stop / engine_error
/// - asr_partial / asr_end
/// - chat_partial / chat_end
/// - mouth_value 0.0-1.030Hz
/// - raw (未识别的 SEMessageType调试用
@interface SpeechEnginePlugin : NSObject <FlutterPlugin>
/// AppDelegate 早期调用,必须在 didFinishLaunchingWithOptions 中调一次。
/// 模拟器构建SDK 未链接)时退化为无操作。
+ (void)prepareEnvironment;
@end