Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

fix(android): when the AI service can't be reached, the listening screen says the subtitles paused too and names a custom service by its address, instead of notes stopped at 00:00

wqugurub129306fedbd
diff --git a/android/app/src/main/kotlin/com/wquguru/cicada/NotesViews.kt b/android/app/src/main/kotlin/com/wquguru/cicada/NotesViews.kt
index 841602f..3032f9d 100644
--- a/android/app/src/main/kotlin/com/wquguru/cicada/NotesViews.kt
+++ b/android/app/src/main/kotlin/com/wquguru/cicada/NotesViews.kt
@@ -102,7 +102,8 @@ object NotesViews {
val (iconRes, text) = when {
network -> R.drawable.i_wifi_off to
(if (app.ling.provider.id == "ling") L("连不上 Ling,联网后继续出字幕")
- else LF("连不上 %@,这段时间的纪要先停在 %@。网络恢复后自动继续。", app.ling.serviceName, notesClock(app)))
+ // Hearing goes through the service too: the subtitles stopped with the notes, so no notes time.
+ else LF("连不上 %@,字幕和纪要暂停,连上后自动继续。", serviceLabel(app)))
app.micSilenced && app.listen.listening -> R.drawable.i_mic to L("麦克风正被通话或其他 app 占用,用完后接着听")
blocking != null -> R.drawable.i_info to blocking
problem != null -> R.drawable.i_info to problem
@@ -128,11 +129,9 @@ object NotesViews {
}
/// Where this meeting's notes stop: the time of the last line they cover.
- private fun notesClock(app: CicadaApp): String {
- val lines = app.listen.sessionId?.let { app.store.lines(it) }.orEmpty()
- val covered = app.notes.notes.covered
- return Languages.clock(if (covered in 1..lines.size) lines[covered - 1].t else 0.0)
- }
+ /// Who the banner names: a custom service by its address, which says more than 这个服务.
+ private fun serviceLabel(app: CicadaApp): String =
+ app.ling.serviceHost.takeIf { app.ling.provider.id == "custom" && it.isNotEmpty() } ?: app.ling.serviceName
/// An import's progress: the bar and "26:40 / 42:15".
fun progress(ui: Ui, file: FileSource): LinearLayout {
@@ -268,7 +267,7 @@ object NotesViews {
if (p.id == "ling") L("这个 Ling key 无效,看看有没有复制全,或换一个新的")
else cicada.Strings.LF("%@ 说这个 key 无效,可能没复制全,或已删除。", L(p.name))
}
- NotesEngine.State.RateLimited -> LF("%@ 很忙,纪要稍后补上。字幕照常。", CicadaApp.shared.ling.serviceName)
+ NotesEngine.State.RateLimited -> LF("%@ 很忙,纪要稍后补上。字幕照常。", serviceLabel(CicadaApp.shared))
NotesEngine.State.Updating -> L("正在整理纪要…")
else -> ""
}
@@ -277,7 +276,7 @@ object NotesViews {
}
// A busy service: the notes catch up by themselves, the subtitles never stopped.
if (status == NotesEngine.State.RateLimited && listening)
- body.addView(ui.text(LF("%@ 很忙,纪要稍后补上。字幕照常。", CicadaApp.shared.ling.serviceName), 13f, AiCheckViews.warn).apply {
+ body.addView(ui.text(LF("%@ 很忙,纪要稍后补上。字幕照常。", serviceLabel(CicadaApp.shared)), 13f, AiCheckViews.warn).apply {
background = ui.rounded(AiCheckViews.warnPale, 10)
setPadding(ui.dp(10), ui.dp(8), ui.dp(10), ui.dp(8))
}, LinearLayout.LayoutParams(-1, -2).apply { bottomMargin = ui.dp(12) })
diff --git a/android/app/src/main/strings/en.lproj/Android.strings b/android/app/src/main/strings/en.lproj/Android.strings
index 9283878..280f9ef 100644
--- a/android/app/src/main/strings/en.lproj/Android.strings
+++ b/android/app/src/main/strings/en.lproj/Android.strings
@@ -26,6 +26,7 @@
"%@ 分钟前更新" = "Updated %@ min ago";
"连不上 Ling,检查网络" = "Can't reach Ling; check your network";
"连不上 Ling,联网后继续出字幕" = "Can't reach Ling. Subtitles will resume when back online.";
+"连不上 %@,字幕和纪要暂停,连上后自动继续。" = "Can't reach %@. Subtitles and notes are paused and resume once it's back.";
"20 秒没听到声音。通话和会议 app 的声音系统不让录" = "No sound for 20s. Call & meeting apps block audio capture.";
"换成面对面" = "Switch to In person";
"正在听下一句…" = "Listening for next line…";
diff --git a/android/app/src/main/strings/ja.lproj/Android.strings b/android/app/src/main/strings/ja.lproj/Android.strings
index 8704047..c2c672d 100644
--- a/android/app/src/main/strings/ja.lproj/Android.strings
+++ b/android/app/src/main/strings/ja.lproj/Android.strings
@@ -26,6 +26,7 @@
"%@ 分钟前更新" = "%@分前に更新";
"连不上 Ling,检查网络" = "Ling に接続できません。ネットワークを確認してください";
"连不上 Ling,联网后继续出字幕" = "Lingに接続できません。通信が戻ると字幕を再開します";
+"连不上 %@,字幕和纪要暂停,连上后自动继续。" = "%@ に接続できません。字幕とメモは一時停止中、つながると自動で再開します。";
"20 秒没听到声音。通话和会议 app 的声音系统不让录" = "20秒間音声がありません。通話・会議アプリは録音できません";
"换成面对面" = "対面に切り替える";
"正在听下一句…" = "次の発言を聞いています…";
diff --git a/android/app/src/main/strings/ko.lproj/Android.strings b/android/app/src/main/strings/ko.lproj/Android.strings
index ec1aa36..28828a0 100644
--- a/android/app/src/main/strings/ko.lproj/Android.strings
+++ b/android/app/src/main/strings/ko.lproj/Android.strings
@@ -26,6 +26,7 @@
"%@ 分钟前更新" = "%@분 전 업데이트";
"连不上 Ling,检查网络" = "Ling에 연결할 수 없습니다. 네트워크를 확인하세요";
"连不上 Ling,联网后继续出字幕" = "Ling에 연결할 수 없어요. 네트워크가 복구되면 자막이 다시 나와요";
+"连不上 %@,字幕和纪要暂停,连上后自动继续。" = "%@에 연결할 수 없습니다. 자막과 노트가 멈췄고, 연결되면 자동으로 이어집니다.";
"20 秒没听到声音。通话和会议 app 的声音系统不让录" = "20초 동안 소리가 안 들려요. 통화 및 회의 앱은 녹음할 수 없어요";
"换成面对面" = "대면으로 전환";
"正在听下一句…" = "다음 문장 듣는 중…";