背景: DeepCW (e04/deepcw-engine) 是基于 CTC 的神经网络 CW 解码模型。本地实测 弱信号解码率显著优于传统 DSP 方案: SNR<0dB 时 CER 16.0% vs ggmorse 52.6%; SNR>=0dB 时两者均接近 0%。模型 400-1200Hz 固定频窗自带定频, 无需频谱峰值 跟踪与噪声门。 改动: - assets/deepcw/model.onnx 15,139,839 字节, 原样收录未作修改 - assets/deepcw/model.onnx.json 模型元数据 (采样率 3200, FFT 256, hop 48, 65 个频段, log1p 归一化, 42 类含 CTC blank) - licenses/DeepCW-AGPL-3.0.txt AGPL-3.0 许可证全文 - licenses/NOTICE.md 来源仓库/作者/取用 commit/SHA-256/ 许可证兼容性说明/复现步骤 - app/build.gradle.kts: androidResources.noCompress += "onnx" 关于 noCompress: ONNX Runtime 通过 mmap 直接读取 assets, 压缩后无法内存映射, createSession 会失败。该配置只在打包 APK 的 app 模块生效, 在 feature 库模块声明无效。 许可证: Look4Sat 为 GPL-3.0-or-later, DeepCW 模型为 AGPL-3.0-only。GPL v3 第 13 条 明确允许两者合并分发。推理完全在本地设备进行, 不通过网络向远程用户提供 模型功能, 故 AGPL 第 13 条的网络源码提供义务不被触发。本仓库公开, 完整 对应源码提供义务已满足。 上游取用 commit: 8e264d243bbd4467bd19f3f28292219405b47e0e 模型 SHA-256: ef120799457bca042d4690944f0faf93268eb4654e7f50f28784ad63bdc1fe02
40 lines
1.4 KiB
Kotlin
40 lines
1.4 KiB
Kotlin
import java.util.Properties
|
|
|
|
plugins {
|
|
alias(libs.plugins.convention.applicationPlugin)
|
|
}
|
|
|
|
// Load signing config from keystore.properties (gitignored, never commit credentials)
|
|
val keystoreProperties = Properties().apply {
|
|
val propsFile = rootProject.file("keystore.properties")
|
|
if (propsFile.exists()) propsFile.inputStream().use { load(it) }
|
|
}
|
|
|
|
android {
|
|
androidResources {
|
|
// 显式保留全部语言(防 shrinkResources 丢弃 in/id 印尼语配置); AGP 9 用 localeFilters
|
|
localeFilters += listOf(
|
|
"en", "zh", "tr", "in", "id", "es", "ru", "si", "uk"
|
|
)
|
|
// DeepCW 模型必须以未压缩形式打包: ONNX Runtime 通过 mmap 直接读取
|
|
// assets, 压缩后无法映射会导致 createSession 失败。noCompress 只在
|
|
// 打包 APK 的 app 模块生效, 在 feature 库模块声明无效。
|
|
noCompress += "onnx"
|
|
}
|
|
signingConfigs {
|
|
if (keystoreProperties["storeFile"] != null) {
|
|
create("release") {
|
|
storeFile = rootProject.file(keystoreProperties["storeFile"] as String)
|
|
storePassword = keystoreProperties["storePassword"] as String
|
|
keyAlias = keystoreProperties["keyAlias"] as String
|
|
keyPassword = keystoreProperties["keyPassword"] as String
|
|
}
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
signingConfig = signingConfigs.findByName("release")
|
|
}
|
|
}
|
|
}
|