Skip to content

mnn STT支持,优化 UI 样式和布局,其他顺带#276

Merged
AAswordman merged 22 commits intoAAswordman:pr-272from
ic-timon:main
Dec 13, 2025
Merged

mnn STT支持,优化 UI 样式和布局,其他顺带#276
AAswordman merged 22 commits intoAAswordman:pr-272from
ic-timon:main

Conversation

@ic-timon
Copy link
Copy Markdown
Contributor

修复了 getParcelableExtraLocale 配置在新版本 Android 上的使用问
更新了所有 Material3 相关调用以适配最新版本
添加必要的 @OptIn 注解,确保实验性 API 能正常编译
通过重构(参数名等...)和清理提高代码可维护性,统一将未使用的参数重命名为下划线前缀
添加 16KB 页面大小支持配置
优化 native 库打包配置,为 libsudo.so 添加 keepDebugSymbols 配置

AAswordman and others added 22 commits December 11, 2025 18:53
- 新增 SherpaMnnSpeechProvider,实现基于 sherpa-mnn 的本地语音识别
- 集成 VAD(语音活动检测)功能,提升识别准确性和资源效率
- 添加 sherpa-mnn Kotlin API 包装类:
  * FeatureConfig - 特征配置
  * OnlineRecognizer - 在线识别器
  * OnlineStream - 音频流处理
  * Vad - 语音活动检测
- 在 SpeechServiceFactory 中注册 Sherpa MNN 服务
- 在 SpeechToTextScreen 中支持 Sherpa MNN 引擎切换
- 添加中英文字符串资源
- 更新 MNN 模块构建配置,支持自动下载 JNI 库和 16KB 页面大小
- 在 dragonbones CMakeLists.txt 中添加 max-page-size=16384 链接选项
- 在 dragonbones build.gradle.kts 中启用 ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES
- 确保原生库兼容 Android 15+ 的 16KB 页面大小要求
- 更新 WindowInsetsController 获取方式,使用 WindowCompat.getInsetsController
- 更新 MediaItem 创建方式,使用 MediaItem.Builder 替代 fromUri
- 更新 InputMethodManager.showSoftInput,使用 SHOW_IMPLICIT 替代 SHOW_FORCED
- 将 Divider 替换为 HorizontalDivider(Material3 API 变更)
- 将 TextFieldDefaults.outlinedTextFieldColors 替换为 OutlinedTextFieldDefaults.colors
- 将部分 Icons.Default 替换为 Icons.AutoMirrored.Filled(支持 RTL)
- 更新所有 UI 组件以使用新的 Material3 API
- 在 HotStream 中添加 @OptIn(ExperimentalCoroutinesApi::class)
- 在 MCPMarketViewModel 和 MCPPluginParser 中添加 @OptIn(ExperimentalSerializationApi::class)
- 将未使用的函数参数重命名为下划线前缀,符合 Kotlin 编码规范
- 涉及多个文件:WorkspaceAttachmentProcessor、ClaudeProvider、MNNProvider、PlanParser 等
- 在 StandardSystemOperationTools、ApiConfigDelegate、CustomEmojiViewModel 中添加 @OptIn 注解
- 移除未使用的 think 变量
- 简化类型转换,直接使用 result.result.packages
- 将 message 重命名为 messageObj 以提高可读性
- 将未使用的 isStreaming 参数重命名为 _isStreaming
- FloatingChatService: 添加 API 33+ 对 getParcelableArrayExtra 的兼容性处理
- UIDebuggerService: 添加 stopForeground API 兼容性处理
- FloatingWindowManager: 添加废弃 API 的 @Suppress 注解
- UIOperationOverlay: 添加 TYPE_PHONE 废弃 API 的 @Suppress 注解
- 添加 API 33+ 对 getParcelableExtra 的兼容性处理
- 添加 config.locale 废弃 API 的 @Suppress 注解
- MessageDisplay: 调整字体样式为 bodyLarge,文本对齐改为 Start
- FloatingFullscreenScreen: 添加顶部和底部 padding 以改善布局
- FloatingChatWindowScreen: 更新发送图标为 AutoMirrored 版本,修复 autoCorrect API 兼容性
- 移除 OnlineRecognizer 中的 TODO 注释
@AAswordman AAswordman changed the base branch from pr-branch to pr-272 December 13, 2025 06:55
@AAswordman AAswordman merged commit a1f0744 into AAswordman:pr-272 Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants