Skip to content

V1 - #1

Merged
forhetale merged 6 commits into
mainfrom
v1
Sep 11, 2026
Merged

V1#1
forhetale merged 6 commits into
mainfrom
v1

Conversation

@forhetale

Copy link
Copy Markdown
Owner

No description provided.

forhetale and others added 6 commits May 13, 2026 23:02
- 单路音频采集:识别与录音共享同一麦克风,边录边写盘,内存占用 O(1)
- 翻译 worker 线程 + 滚动双语上下文,识别回调不再阻塞;停止后异步收尾保存
- core 惰性导入(PEP 562),本地模式不再强制依赖 Azure SDK
- 自适应能量 VAD、最长句强制切分、MP3 回退返回真实路径
- 配置支持 keyring + 环境变量覆盖 + 原子写入,新增滚动日志
- 重写测试套件(46 例,可选依赖自动跳过)
- 新增 pyproject/ruff/pytest 配置与 Windows CI,PyInstaller spec 可移植化
- 文档全面对齐实现,移除过期的 Docker/Streamlit 脚本
@forhetale
forhetale merged commit 5547c50 into main Sep 11, 2026
6 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 371f453974

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread core/session_manager.py
sessions = []

for filepath in sorted(self.storage_dir.glob("session_*.yaml")):
for fp in SESSIONS_DIR.glob("*.json"):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Migrate previously saved session archives

Users upgrading from the previous Streamlit workflow have session_*.yaml archives in the same ~/.lectrans/sessions directory, but the history loader now enumerates only JSON files. Consequently, every previously saved lecture disappears from the new History UI (and can no longer be exported there) immediately after upgrade. Add a one-time migration or retain a legacy YAML reader before switching the file format.

Useful? React with 👍 / 👎.

Comment thread config.py

def __init__(self):
# 语音识别引擎选择: "local" 或 "azure"
self.asr_engine = "local"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve Azure selection for existing GUI configurations

The prior documented GUI stored azure_key and api_key in config.json but had no asr_engine field. On upgrade, loading that file leaves this new default as local; because local mode only requires the MiMo key, the app reports itself configured and silently starts Faster-Whisper instead of the user's previously configured Azure recognizer. Infer or migrate asr_engine="azure" when a legacy configuration contains an Azure key.

Useful? React with 👍 / 👎.

Comment thread ui/app.py
Comment on lines +542 to +544
context.append([korean, chinese])
if context_size and len(context) > context_size:
context = context[-context_size:]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep zero translation context from growing indefinitely

When a user sets the allowed context count to 0, every translated pair is still appended, and this conditional never trims the list because context_size is falsy. The next request therefore receives all prior lecture content rather than no context, causing prompts to grow without bound and eventually hit API context limits during long recordings. Skip appending context (or clear it) when the configured size is zero.

Useful? React with 👍 / 👎.

Comment thread ui/app.py
Comment on lines +635 to +636
summary = self.mimo_client.summarize(transcript, self.config.llm_model)
self.root.after(0, lambda: self._show_summary(summary))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain generated summaries in session state

A generated summary is passed only to the dialog and never assigned to self.summary. Thus, if a user generates a summary before stopping a recording, _finalize_session saves the still-empty self.summary, and later Markdown exports omit it as well. Store the result on the app before scheduling the UI update.

Useful? React with 👍 / 👎.

Comment thread config.py
Comment on lines +164 to +167
if _save_secret("azure_key", azure_key):
azure_key = ""
if _save_secret("api_key", api_key):
api_key = ""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove keyring entries when credentials are cleared

For installations with a working keyring, clearing either key in Settings makes _save_secret return false without deleting the existing keyring value. The JSON file is then written with an empty value, but the next launch sees that empty value and reloads the stale credential from keyring, so users cannot actually remove a revoked key. Delete the corresponding keyring password when the submitted value is blank.

Useful? React with 👍 / 👎.

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.

1 participant