ChatVoice 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. {chatvoice-0.2.0 → chatvoice-0.3.0}/CHANGELOG.md +15 -0
  2. {chatvoice-0.2.0/src/ChatVoice.egg-info → chatvoice-0.3.0}/PKG-INFO +7 -4
  3. {chatvoice-0.2.0 → chatvoice-0.3.0}/README.en.md +6 -3
  4. {chatvoice-0.2.0 → chatvoice-0.3.0}/README.md +6 -3
  5. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/api-access.en.md +17 -0
  6. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/api-access.md +17 -0
  7. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/capability-map.en.md +3 -1
  8. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/capability-map.md +3 -1
  9. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/deployment.en.md +1 -1
  10. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/deployment.md +1 -1
  11. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/quickstart.en.md +1 -1
  12. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/quickstart.md +1 -1
  13. chatvoice-0.3.0/docs/recording-storage.en.md +48 -0
  14. chatvoice-0.3.0/docs/recording-storage.md +48 -0
  15. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/runtime-layout.en.md +11 -3
  16. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/runtime-layout.md +11 -3
  17. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/web-guide.en.md +13 -2
  18. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/web-guide.md +13 -2
  19. {chatvoice-0.2.0 → chatvoice-0.3.0/src/ChatVoice.egg-info}/PKG-INFO +7 -4
  20. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/ChatVoice.egg-info/SOURCES.txt +7 -0
  21. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/__init__.py +1 -1
  22. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/web/legacy_app.py +544 -4
  23. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/web/static/index.html +388 -12
  24. chatvoice-0.3.0/src/chatvoice/web/upload_limits.py +45 -0
  25. chatvoice-0.3.0/tests/nonbrowser_audio_import.cjs +87 -0
  26. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/nonbrowser_flows.cjs +152 -0
  27. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/nonbrowser_harness.cjs +23 -4
  28. chatvoice-0.3.0/tests/test_meeting_audio_edges.py +106 -0
  29. chatvoice-0.3.0/tests/test_meeting_audio_import.py +149 -0
  30. chatvoice-0.3.0/tests/test_meeting_audio_import_frontend.py +23 -0
  31. chatvoice-0.3.0/tests/test_meeting_audio_storage.py +222 -0
  32. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_nonbrowser_flows.py +3 -0
  33. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_nonbrowser_routes.py +0 -8
  34. chatvoice-0.3.0/tests/test_recording_retention_frontend.py +93 -0
  35. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_todo_storage.py +0 -3
  36. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_version.py +1 -1
  37. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_web_static_contract.py +9 -7
  38. chatvoice-0.2.0/docs/recording-storage.en.md +0 -31
  39. chatvoice-0.2.0/docs/recording-storage.md +0 -31
  40. {chatvoice-0.2.0 → chatvoice-0.3.0}/.github/workflows/ci.yml +0 -0
  41. {chatvoice-0.2.0 → chatvoice-0.3.0}/.github/workflows/deploy.yaml +0 -0
  42. {chatvoice-0.2.0 → chatvoice-0.3.0}/.github/workflows/preview.yaml +0 -0
  43. {chatvoice-0.2.0 → chatvoice-0.3.0}/.github/workflows/publish.yml +0 -0
  44. {chatvoice-0.2.0 → chatvoice-0.3.0}/AGENTS.md +0 -0
  45. {chatvoice-0.2.0 → chatvoice-0.3.0}/DEVELOP.md +0 -0
  46. {chatvoice-0.2.0 → chatvoice-0.3.0}/LICENSE +0 -0
  47. {chatvoice-0.2.0 → chatvoice-0.3.0}/MANIFEST.in +0 -0
  48. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/cli-tree.en.md +0 -0
  49. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/cli-tree.md +0 -0
  50. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/configuration.en.md +0 -0
  51. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/configuration.md +0 -0
  52. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/index.en.md +0 -0
  53. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/index.md +0 -0
  54. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/interface-tree.en.md +0 -0
  55. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/interface-tree.md +0 -0
  56. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/markdown-todo.en.md +0 -0
  57. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/markdown-todo.md +0 -0
  58. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/testing.en.md +0 -0
  59. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/testing.md +0 -0
  60. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/text-models.en.md +0 -0
  61. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/text-models.md +0 -0
  62. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/troubleshooting.en.md +0 -0
  63. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/troubleshooting.md +0 -0
  64. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/tts-models.en.md +0 -0
  65. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/tts-models.md +0 -0
  66. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/voice-cloning.en.md +0 -0
  67. {chatvoice-0.2.0 → chatvoice-0.3.0}/docs/voice-cloning.md +0 -0
  68. {chatvoice-0.2.0 → chatvoice-0.3.0}/mkdocs.yml +0 -0
  69. {chatvoice-0.2.0 → chatvoice-0.3.0}/pyproject.toml +0 -0
  70. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/check_asr_contract.py +0 -0
  71. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/check_asr_gpu_contract.py +0 -0
  72. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/check_meeting_e2e.py +0 -0
  73. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/check_meeting_notes_canvas_contract.py +0 -0
  74. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/check_meeting_storage_contract.py +0 -0
  75. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/check_meeting_title_contract.py +0 -0
  76. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/check_transcript_extraction.py +0 -0
  77. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/check_ui_contract.py +0 -0
  78. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/funasr_worker.py +0 -0
  79. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/manage_accounts.py +0 -0
  80. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/probe_qwen_audio.py +0 -0
  81. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/probe_token_plan_tts_ws.py +0 -0
  82. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/smoke_asr_api.py +0 -0
  83. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/smoke_demo.py +0 -0
  84. {chatvoice-0.2.0 → chatvoice-0.3.0}/scripts/verify_service.py +0 -0
  85. {chatvoice-0.2.0 → chatvoice-0.3.0}/setup.cfg +0 -0
  86. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/ChatVoice.egg-info/dependency_links.txt +0 -0
  87. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/ChatVoice.egg-info/entry_points.txt +0 -0
  88. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/ChatVoice.egg-info/requires.txt +0 -0
  89. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/ChatVoice.egg-info/top_level.txt +0 -0
  90. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/accounts.py +0 -0
  91. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/asr.py +0 -0
  92. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/backup.py +0 -0
  93. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/cli.py +0 -0
  94. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/client.py +0 -0
  95. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/config.py +0 -0
  96. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/doctor.py +0 -0
  97. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/health.py +0 -0
  98. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/paths.py +0 -0
  99. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/scripts/__init__.py +0 -0
  100. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/scripts/funasr_worker.py +0 -0
  101. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/service.py +0 -0
  102. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/text_api.py +0 -0
  103. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/todo_markdown.py +0 -0
  104. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/tts_api.py +0 -0
  105. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/tts_qwen.py +0 -0
  106. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/web/__init__.py +0 -0
  107. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/web/auth_adapter.py +0 -0
  108. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/web/login_ui.py +0 -0
  109. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/web/server.py +0 -0
  110. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/web/static/login-brand.css +0 -0
  111. {chatvoice-0.2.0 → chatvoice-0.3.0}/src/chatvoice/web/static/transcript-state.js +0 -0
  112. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/conftest.py +0 -0
  113. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/nonbrowser_realtime_error.cjs +0 -0
  114. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/nonbrowser_shared_login.cjs +0 -0
  115. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/nonbrowser_todo_page.cjs +0 -0
  116. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_accounts_cli.py +0 -0
  117. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_api_tokens.py +0 -0
  118. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_chatlogin_auth.py +0 -0
  119. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_cli.py +0 -0
  120. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_cli_token_data.py +0 -0
  121. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_config.py +0 -0
  122. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_docs_standard.py +0 -0
  123. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_documented_interfaces.py +0 -0
  124. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_live_acceptance_contract.py +0 -0
  125. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_live_exchanges.py +0 -0
  126. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_login_service.py +0 -0
  127. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_nonbrowser_runner_contract.py +0 -0
  128. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_public_docs_contract.py +0 -0
  129. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_realtime_provider_errors.py +0 -0
  130. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_runtime_cli.py +0 -0
  131. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_runtime_env.py +0 -0
  132. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_shared_login.py +0 -0
  133. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_text_api.py +0 -0
  134. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_text_web.py +0 -0
  135. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_todo_integration_edges.py +0 -0
  136. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_todo_markdown.py +0 -0
  137. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_todo_page.py +0 -0
  138. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_todo_routes.py +0 -0
  139. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_tts_api.py +0 -0
  140. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_tts_qwen.py +0 -0
  141. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_tts_web.py +0 -0
  142. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_web_app.py +0 -0
  143. {chatvoice-0.2.0 → chatvoice-0.3.0}/tests/test_workflow_contract.py +0 -0
@@ -1,5 +1,20 @@
1
1
  # 更新日志
2
2
 
3
+ ## 0.3.0 - 2026-10-06
4
+
5
+ ### 新增
6
+
7
+ - 会议录音增加默认关闭的原始音频保存模式;登录用户明确开启后随会议保存,支持私有播放和下载,暂停/继续与尾部音频完整衔接。
8
+ - 已有录音可导入普通会议,经现有 ASR 通道转写后继续生成标题、摘要和完善纪要;支持可选原始文件保留、可见处理状态和取消。
9
+ - 增加音频资产与导入状态的非破坏 SQLite 迁移;旧记录和省略保存模式的旧客户端保持兼容。
10
+
11
+ ### 安全与边界
12
+
13
+ - 录音文件按 owner 隔离,写操作校验 CSRF;删除或清空会议同时清理音频,录音代次阻止旧上传在清空后重新提交。
14
+ - 录音归档限制为 128 MiB,音频导入限制为 12 MiB;上传在 multipart 解析前和实际流式读取中检查大小,文件名由服务端生成。
15
+ - 导入失败、无文字、取消或落盘失败不建立半成品会议;重复完成不会重复写入,长转写按正常会议片段限制拆分但不截断。
16
+ - 双语文档说明默认隐私、访客限制、清理与数据库备份不包含录音文件的边界;声音复刻和实时对话音频策略不变。
17
+
3
18
  ## 0.2.0 - 2026-09-11
4
19
 
5
20
  ### 更改
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ChatVoice
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: ChatArch voice recording, transcription, and meeting-notes toolkit.
5
5
  Author-email: ChatArch <rex@chatarch.org>
6
6
  License-Expression: MIT
@@ -60,7 +60,7 @@ ChatVoice 是 ChatArch 的录音转写与会议工作区 Python 包,包含 Spe
60
60
  要求 Python 3.10 或更高版本,建议安装到独立虚拟环境。
61
61
 
62
62
  ```bash
63
- python -m pip install "ChatVoice[web]==0.2.0"
63
+ python -m pip install "ChatVoice[web]==0.3.0"
64
64
  chatvoice --version
65
65
  chatvoice --tree
66
66
  chatvoice serve app --dry-run --json
@@ -70,7 +70,8 @@ chatvoice serve app --dry-run --json
70
70
 
71
71
  ## 当前能力
72
72
 
73
- - **会议记录**:实时转写、暂停与继续、会议标题、标签、历史记录和复制文字。
73
+ - **会议记录**:实时转写、暂停与继续、会议标题、标签、历史记录和复制文字。默认只做语音识别;登录后可选择保存原始录音,随会议播放或下载。
74
+ - **录音导入**:导入不超过 12 MiB 的已有音频,经当前 ASR 通道转写后建立普通会议,继续生成标题、摘要和完善纪要。原始文件默认不保留,可明确选择保存。
74
75
  - **摘要与纪要**:生成摘要,手动编辑纪要,或通过对话修改并撤销。
75
76
  - **Markdown Todo**:由用户点击“转为 Todo”,在独立页面继续编辑、对话完善、复制或下载 `.md`;不会自动转换或执行任务。
76
77
  - **声音工作室**:配置系统音色与输出格式;通过独立声音复刻服务,以授权参考音频生成临时试听结果。
@@ -81,7 +82,9 @@ chatvoice serve app --dry-run --json
81
82
 
82
83
  ## 数据与安全边界
83
84
 
84
- 账号记录保存到 `~/.chatarch/chatvoice` 下的 SQLite;访客记录仅存于当前浏览器。录音会为识别而短暂经过浏览器和服务端,但不作为会议音频档案保存。密钥不进入浏览器。
85
+ 账号记录保存到 `~/.chatarch/chatvoice` 下的 SQLite;访客记录仅存于当前浏览器。原始录音默认不保存;登录用户明确开启后,文件私有保存到会议名下,播放、下载和删除均校验所有权。访客不能保存服务器录音。密钥不进入浏览器。
86
+
87
+ 清空或删除会议会清理关联录音;切换保存模式不删除已有文件,也不能恢复此前未保存的音频。数据库备份不包含录音文件,保留原始录音时须同时备份私有音频目录。
85
88
 
86
89
  自助注册关闭,由部署者创建受邀账号。ChatVoice 直接依赖 ChatLogin 0.1.2 的内建 `ChatVoiceAuth`,复用既有账号、会话和 CSRF;`/login` 使用可定制的共享 `LoginUI`。会议所有权和 Token 权限仍由 ChatVoice 控制,访客草稿等待 IndexedDB 事务提交后才跳转登录。详见[数据保留边界](https://arch.gh.wzhecnu.cn/ChatVoice/recording-storage/)。
87
90
 
@@ -20,7 +20,7 @@ ChatVoice is the ChatArch Python package behind the Speakr recording and meeting
20
20
  Python 3.10+ is required. Use a dedicated virtual environment.
21
21
 
22
22
  ```bash
23
- python -m pip install "ChatVoice[web]==0.2.0"
23
+ python -m pip install "ChatVoice[web]==0.3.0"
24
24
  chatvoice --version
25
25
  chatvoice --tree
26
26
  chatvoice serve app --dry-run --json
@@ -30,7 +30,8 @@ Installation neither starts a service nor downloads GPU models. The quick start
30
30
 
31
31
  ## Capabilities
32
32
 
33
- - Meeting recording, live transcription, pause/resume, titles, tags and history.
33
+ - Meeting recording, live transcription, pause/resume, titles, tags and history. Audio is discarded by default; account users may explicitly retain recordings for owner-protected playback and download.
34
+ - Import an existing audio file up to 12 MiB through the configured ASR channel into a normal meeting, then generate titles, summaries and refined notes. Original-file retention is optional and defaults off.
34
35
  - Summary generation, direct editing, conversation-based refinement and undo.
35
36
  - Explicit summary-to-Todo conversion, a separate Markdown editor and refinement conversation, copy and `.md` export. No automatic conversion or task execution.
36
37
  - Configurable system TTS and an independent one-shot voice-cloning service.
@@ -41,7 +42,9 @@ Model configuration is server-side. Independent text settings serve notes and ti
41
42
 
42
43
  ## Data and security
43
44
 
44
- Account records use SQLite below `~/.chatarch/chatvoice`. Guest records remain in the browser. Audio passes through transcription processing but is not retained as a meeting recording archive. Provider keys never reach the browser.
45
+ Account records use SQLite below `~/.chatarch/chatvoice`. Guest records remain in the browser. Original audio is discarded by default; explicit account opt-in stores private files associated with the meeting. Playback, download and deletion check ownership. Guests cannot retain server recordings. Provider keys never reach the browser.
46
+
47
+ Clearing or deleting a meeting removes its retained audio. Switching retention mode neither deletes existing files nor recovers previously discarded audio. A database backup does not include recording bytes; back up the private audio directory together with the database when retention is used.
45
48
 
46
49
  Self-registration is disabled; operators provision invited accounts. ChatVoice uses the built-in `ChatVoiceAuth` backend from ChatLogin 0.1.2 and a customizable shared `LoginUI` at `/login`. Existing accounts, sessions and CSRF remain compatible; ChatVoice retains owner and token policy. Guest drafts must commit their IndexedDB transaction before login navigation.
47
50
 
@@ -20,7 +20,7 @@ ChatVoice 是 ChatArch 的录音转写与会议工作区 Python 包,包含 Spe
20
20
  要求 Python 3.10 或更高版本,建议安装到独立虚拟环境。
21
21
 
22
22
  ```bash
23
- python -m pip install "ChatVoice[web]==0.2.0"
23
+ python -m pip install "ChatVoice[web]==0.3.0"
24
24
  chatvoice --version
25
25
  chatvoice --tree
26
26
  chatvoice serve app --dry-run --json
@@ -30,7 +30,8 @@ chatvoice serve app --dry-run --json
30
30
 
31
31
  ## 当前能力
32
32
 
33
- - **会议记录**:实时转写、暂停与继续、会议标题、标签、历史记录和复制文字。
33
+ - **会议记录**:实时转写、暂停与继续、会议标题、标签、历史记录和复制文字。默认只做语音识别;登录后可选择保存原始录音,随会议播放或下载。
34
+ - **录音导入**:导入不超过 12 MiB 的已有音频,经当前 ASR 通道转写后建立普通会议,继续生成标题、摘要和完善纪要。原始文件默认不保留,可明确选择保存。
34
35
  - **摘要与纪要**:生成摘要,手动编辑纪要,或通过对话修改并撤销。
35
36
  - **Markdown Todo**:由用户点击“转为 Todo”,在独立页面继续编辑、对话完善、复制或下载 `.md`;不会自动转换或执行任务。
36
37
  - **声音工作室**:配置系统音色与输出格式;通过独立声音复刻服务,以授权参考音频生成临时试听结果。
@@ -41,7 +42,9 @@ chatvoice serve app --dry-run --json
41
42
 
42
43
  ## 数据与安全边界
43
44
 
44
- 账号记录保存到 `~/.chatarch/chatvoice` 下的 SQLite;访客记录仅存于当前浏览器。录音会为识别而短暂经过浏览器和服务端,但不作为会议音频档案保存。密钥不进入浏览器。
45
+ 账号记录保存到 `~/.chatarch/chatvoice` 下的 SQLite;访客记录仅存于当前浏览器。原始录音默认不保存;登录用户明确开启后,文件私有保存到会议名下,播放、下载和删除均校验所有权。访客不能保存服务器录音。密钥不进入浏览器。
46
+
47
+ 清空或删除会议会清理关联录音;切换保存模式不删除已有文件,也不能恢复此前未保存的音频。数据库备份不包含录音文件,保留原始录音时须同时备份私有音频目录。
45
48
 
46
49
  自助注册关闭,由部署者创建受邀账号。ChatVoice 直接依赖 ChatLogin 0.1.2 的内建 `ChatVoiceAuth`,复用既有账号、会话和 CSRF;`/login` 使用可定制的共享 `LoginUI`。会议所有权和 Token 权限仍由 ChatVoice 控制,访客草稿等待 IndexedDB 事务提交后才跳转登录。详见[数据保留边界](https://arch.gh.wzhecnu.cn/ChatVoice/recording-storage/)。
47
50
 
@@ -49,6 +49,23 @@ Drafts are saved and the IndexedDB transaction must complete before leaving for
49
49
 
50
50
  Meeting writes contain title, timestamps, duration, tags, transcript segments, summary/refinement conversation and `todo_markdown` / `todo_chat_messages`. Detail responses include content; lists stay lightweight. Older clients omitting Todo fields preserve existing values; explicit empty text/lists clear them.
51
51
 
52
+ ## Meeting-audio retention and import {#meeting-audio}
53
+
54
+ These endpoints require account cookies and ownership, with CSRF for writes. Read-only data tokens do not automatically grant audio-file access.
55
+
56
+ | Method and path | Input and result |
57
+ | --- | --- |
58
+ | `POST /api/meetings/{id}/audio` | Multipart `file`, `upload_token`, `generation`; one completed recording pass, up to 128 MiB |
59
+ | `GET /api/meetings/{id}/audio/{audio_id}` | Private playback with controlled audio MIME and no caching |
60
+ | `GET /api/meetings/{id}/audio/{audio_id}/download` | Attachment download of the same private file |
61
+ | `DELETE /api/meetings/{id}/audio` | Delete all associated audio and increment recording generation |
62
+ | `POST /api/meetings/{id}/import` | Multipart `file`, `import_token`, optional `retain_audio=false`, `channel`, `correct`; up to 12 MiB |
63
+ | `DELETE /api/meeting-imports/{import_token}` | Cancel an owned import, also removing a just-committed meeting in a completion race |
64
+
65
+ Meeting writes accept `audio_retention`, defaulting off and preserving existing choices when omitted. Detail responses include `audio_assets` and read-only `audio_generation`. Upload with the generation captured at recording start; old uploads after clearing return 409. Initial generation is zero, but clients should read the actual value.
66
+
67
+ Import does not overwrite an existing meeting. Success returns a normal `meeting`; repeating its completed token returns the existing result. Cancelled or failed tokens cannot silently trigger recognition again. Empty files return 400, size limits 413, invalid container/MIME 415, conflicts/cancellation 409, invalid model output 502, storage failure 503, and ASR timeout 504. Failures create no half-finished meeting. Actual decoding depends on the configured ASR. A reverse proxy must allow the application file limit plus the 64 KiB multipart allowance.
68
+
52
69
  ## Text processing {#text}
53
70
 
54
71
  | Method and path | Input | Output |
@@ -49,6 +49,23 @@ app = create_app(login_ui=LoginUI(
49
49
 
50
50
  会议保存包含标题、时间、时长、标签、转写片段、摘要、完善对话,以及 `todo_markdown`、`todo_chat_messages`。详情返回正文,列表保持轻量。旧客户端省略 Todo 字段不会清空既有值,显式空字符串/空列表可以清空。
51
51
 
52
+ ## 会议录音保存与导入 {#meeting-audio}
53
+
54
+ 下列接口要求账号 Cookie 与会议所有权,写操作同时校验 CSRF;只读数据 Token 不自动获得音频文件访问权。
55
+
56
+ | 方法与路径 | 请求与结果 |
57
+ | --- | --- |
58
+ | `POST /api/meetings/{id}/audio` | multipart:`file`、`upload_token`、`generation`;正常完成的一段录音,最大 128 MiB |
59
+ | `GET /api/meetings/{id}/audio/{audio_id}` | 私有音频播放;受控音频 MIME 与禁止缓存 |
60
+ | `GET /api/meetings/{id}/audio/{audio_id}/download` | 同一私有文件的附件下载 |
61
+ | `DELETE /api/meetings/{id}/audio` | 清理会议所有音频并递增录音代次 |
62
+ | `POST /api/meetings/{id}/import` | multipart:`file`、`import_token`,可选 `retain_audio=false`、`channel`、`correct`;最大 12 MiB |
63
+ | `DELETE /api/meeting-imports/{import_token}` | 取消自己的导入;完成与取消交错时也清理刚建立的会议 |
64
+
65
+ 会议保存支持 `audio_retention`,默认关闭;省略字段不修改既有选择。详情返回 `audio_assets` 和只读的 `audio_generation`。录音上传使用采集时的代次;清空后的旧上传返回 409,不重新建立音频。初始代次是 0,客户端应读取实际值。
66
+
67
+ 导入不覆盖已有会议,成功返回 `meeting` 并使用正常文字/纪要流程;相同完成 token 返回既有结果。取消或失败 token 不能静默重复识别。空文件 400、超限 413、容器/MIME 错误 415、冲突/取消 409、无效模型结果 502、存储失败 503、识别超时 504;失败时不留下半成品会议。实际 ASR 解码能力由配置决定。反向代理的 body limit 需覆盖应用文件限额及 64 KiB multipart 余量。
68
+
52
69
  ## 文本处理 {#text}
53
70
 
54
71
  | 方法与路径 | 请求关键字段 | 返回 |
@@ -5,6 +5,8 @@ This map explains what ChatVoice owns. Invocation details live in the [CLI tree]
5
5
  | Capability | Entry | Dependency/boundary |
6
6
  | --- | --- | --- |
7
7
  | Recording and transcription | Web, ASR HTTP/WebSocket | Microphone permission and configured ASR; stub is only a fixture |
8
+ | Optional meeting-audio retention | Web and meeting-audio APIs | Default off, explicit account opt-in; private playback/download, cleanup and 128 MiB limit |
9
+ | Existing audio import | Web and meeting-import APIs | Configured ASR, 12 MiB limit; normal meetings, optional retention and cancellation/rollback |
8
10
  | Summaries and refinement | Web, notes API | Independent text model; transcript is retained |
9
11
  | Markdown Todo | Web, Todo API, Python callback module | Explicit conversion/edit/refinement/undo/export; no task execution |
10
12
  | Meeting and conversation storage | Web and account APIs | Account SQLite or guest IndexedDB |
@@ -26,7 +28,7 @@ This map explains what ChatVoice owns. Invocation details live in the [CLI tree]
26
28
  ## Outside current scope
27
29
 
28
30
  - Todo execution, mind maps or cross-system task orchestration.
29
- - Raw meeting-audio archives, permanent cloned-voice libraries or audio history.
31
+ - A general recording-file library, raw realtime-conversation archives, permanent cloned-voice libraries or generated-audio history.
30
32
  - Postgres/MySQL switching or distributed storage.
31
33
  - Automatic deployment/migration of every model backend or proxy management.
32
34
 
@@ -5,6 +5,8 @@
5
5
  | 能力 | 当前入口 | 依赖与边界 |
6
6
  | --- | --- | --- |
7
7
  | 录音转写 | 网页、ASR HTTP/WebSocket | 麦克风权限与已配置 ASR;stub 仅供验证 |
8
+ | 可选会议录音保留 | 网页、会议音频接口 | 默认关闭,账号明确开启;私有播放/下载、清理及 128 MiB 上限 |
9
+ | 已有录音导入 | 网页、会议导入接口 | 当前 ASR 通道、12 MiB 上限;普通会议、可选保留、取消与失败回滚 |
8
10
  | 摘要与完善 | 网页、纪要接口 | 独立文本模型;保留转写 |
9
11
  | Markdown Todo | 网页、Todo 接口、Python 回调模块 | 手动触发、可编辑/对话/撤销/导出,不执行任务 |
10
12
  | 会议与实时对话存储 | 网页、账号数据接口 | 账号 SQLite;访客 IndexedDB |
@@ -26,7 +28,7 @@
26
28
  ## 不属于当前能力
27
29
 
28
30
  - 自动执行 Todo、思维导图或跨系统任务调度。
29
- - 原始会议录音档案、永久克隆音色库、生成音频历史。
31
+ - 通用录音文件库、实时对话原始音频档案、永久克隆音色库和生成音频历史。
30
32
  - Postgres/MySQL 切换或分布式存储。
31
33
  - 自动安装、迁移所有模型后端或管理反向代理。
32
34
 
@@ -12,7 +12,7 @@ Choose a service shape first. ChatVoice ships a web server, not a system-service
12
12
  ## Install and inspect
13
13
 
14
14
  ```bash
15
- python -m pip install "ChatVoice[web]==0.2.0"
15
+ python -m pip install "ChatVoice[web]==0.3.0"
16
16
  chatvoice paths --json
17
17
  chatvoice doctor --json
18
18
  chatvoice service plan --ensure-dirs --json
@@ -12,7 +12,7 @@
12
12
  ## 安装和预检
13
13
 
14
14
  ```bash
15
- python -m pip install "ChatVoice[web]==0.2.0"
15
+ python -m pip install "ChatVoice[web]==0.3.0"
16
16
  chatvoice paths --json
17
17
  chatvoice doctor --json
18
18
  chatvoice service plan --ensure-dirs --json
@@ -36,7 +36,7 @@ Python 3.10+ is required. This POSIX example uses a virtual environment under Ch
36
36
  ```bash
37
37
  python3 -m venv "$HOME/.chatarch/chatvoice/.venv"
38
38
  . "$HOME/.chatarch/chatvoice/.venv/bin/activate"
39
- python -m pip install "ChatVoice[web]==0.2.0"
39
+ python -m pip install "ChatVoice[web]==0.3.0"
40
40
  chatvoice --version
41
41
  chatvoice --tree
42
42
  ```
@@ -36,7 +36,7 @@
36
36
  ```bash
37
37
  python3 -m venv "$HOME/.chatarch/chatvoice/.venv"
38
38
  . "$HOME/.chatarch/chatvoice/.venv/bin/activate"
39
- python -m pip install "ChatVoice[web]==0.2.0"
39
+ python -m pip install "ChatVoice[web]==0.3.0"
40
40
  chatvoice --version
41
41
  chatvoice --tree
42
42
  ```
@@ -0,0 +1,48 @@
1
+ # Data Retention Boundary
2
+
3
+ Original meeting audio is **discarded by default**. Account users may explicitly opt in before recording or importing. Processing audio and retaining it are different operations.
4
+
5
+ | Data | Account mode | Guest mode |
6
+ | --- | --- | --- |
7
+ | Title, tags and transcript | Owner-isolated server SQLite | Current-browser IndexedDB |
8
+ | Summary, note refinement, Markdown Todo and conversations | Stored with the meeting | Stored with the local meeting |
9
+ | Original meeting recording | Discarded by default; private retention only after opt-in | No server or browser recording archive |
10
+ | Imported original file | Deleted after processing by default; optional private retention | Only the recognized text record is saved |
11
+ | Realtime conversation text | Stored with the conversation | Browser-local record |
12
+ | Provider credentials | Server-side only | Never sent to the browser |
13
+
14
+ ## Choose a recording mode
15
+
16
+ | Mode | Behavior | Available to |
17
+ | --- | --- | --- |
18
+ | Transcribe without saving audio | No meeting-audio archive buffer or persistent recording file | Default for accounts and guests |
19
+ | Save original recording | Capture browser-encoded audio from recording start and associate it with the meeting after normal completion | Logged-in accounts |
20
+
21
+ Pause and resume belong to the same recording. After finishing, wait for the saved-audio confirmation. Starting another recording after completion creates another audio asset, rather than replacing earlier files. A new pass cannot start while its predecessor is still saving. Recording archives are limited to 128 MiB; an exceeded limit or browser recording failure has an explicit error, not a successful-save claim.
22
+
23
+ Changing mode affects later recordings only. It neither deletes existing files nor recovers discarded audio. Clearing, creating or deleting an active meeting interrupts and discards incomplete capture; finish and confirm saving before switching meetings if you need the current recording.
24
+
25
+ ## Import existing audio
26
+
27
+ Use the audio-import control in the meeting recorder. WAV, MP3, WebM, Ogg, M4A/MP4 and FLAC containers are accepted up to 12 MiB per file; actual decoding depends on the selected ASR channel. Successful import opens a normal meeting for titles, summaries and note refinement, not a separate audio library.
28
+
29
+ In account mode, the recording-mode choice also controls original-file retention. With retention off, staged files are removed after normal processing. Guests only create browser-local text meetings. Recognition failures, empty results, cancellation and storage failures do not create half-finished meetings. Cancellation prevents result commit, but cannot promise immediate interruption of upstream or already-running model computation. Check history instead of submitting again if cancellation was not confirmed.
30
+
31
+ ## Private files and deletion
32
+
33
+ - Retained files live in runtime `data/meeting-audio/`, using server-generated names, `0700` directories and `0600` files.
34
+ - Playback and download require a valid account session and meeting ownership. They are not anonymous links; read-only data tokens do not automatically grant audio-file access.
35
+ - Clearing a meeting deletes associated audio and invalidates old uploads; deleting a meeting also cleans its audio. Cleanup failures are reported rather than counted as successful deletion.
36
+ - Downloaded, exported, backed-up or third-party copies have independent lifecycles. Confirm authorization before retaining or using recordings.
37
+
38
+ ## Processing is not archiving
39
+
40
+ Microphone and imported audio pass through the browser, ChatVoice and the selected ASR provider. Temporary files under `temp/asr` or `temp/audio-uploads` may be used for decoding, recognition or validation and are removed during normal cleanup. External services have their own policies. Discarding recordings does not mean audio never crosses the network or disk, nor that guest transcription works offline.
41
+
42
+ Voice-studio TTS/cloning output remains temporary task preview/download audio. Cloning requires an authorized reference and creates neither a permanent voice library nor generation history. The meeting retention mode does not retain raw realtime-conversation audio.
43
+
44
+ ## Backups
45
+
46
+ `chatvoice data dump` backs up SQLite only, not recording bytes. When retaining audio, stop the service normally and back up or restore the consistent database snapshot together with `data/meeting-audio/`. Restoring only the database cannot recover missing recordings. Code rollback must not overwrite newer records with a stale database.
47
+
48
+ [Runtime and backup](runtime-layout.md) · [Access and API](api-access.md) · [Web guide](web-guide.md)
@@ -0,0 +1,48 @@
1
+ # 数据保留边界
2
+
3
+ 会议原始录音**默认不保存**。账号用户可以在录音或导入前明确选择保留;处理音频与保留音频是不同的操作。
4
+
5
+ | 数据 | 账号模式 | 访客模式 |
6
+ | --- | --- | --- |
7
+ | 标题、标签、转写 | 服务器 SQLite,按账号隔离 | 当前浏览器 IndexedDB |
8
+ | 摘要、纪要完善、Markdown Todo 与对话 | 随会议保存 | 随本地会议保存 |
9
+ | 会议原始录音 | 默认不保存;明确开启后私有保留 | 不建立服务器或浏览器录音档案 |
10
+ | 导入的原始文件 | 默认处理后删除;可明确选择保留 | 只保存识别后的文字记录 |
11
+ | 实时对话文字 | 随对话记录保存 | 当前浏览器保存 |
12
+ | 模型服务密钥 | 仅服务端配置 | 不发送到浏览器 |
13
+
14
+ ## 选择录音模式
15
+
16
+ | 模式 | 行为 | 适用范围 |
17
+ | --- | --- | --- |
18
+ | 只做语音识别,不保存录音 | 不创建会议录音归档缓冲或持久文件 | 默认;账号和访客 |
19
+ | 保存原始录音 | 从开始录音时采集浏览器编码的音频,正常结束后与会议关联 | 已登录账号 |
20
+
21
+ 暂停与继续仍属于同一次录音,结束后等待“原始录音已保存”提示。结束后再次录音会建立新的音频资产,不会覆盖此前的文件。保存进行中不能开始下一次录音。录音归档最大 128 MiB;超限或浏览器录音失败会显示具体原因,不能把未完成的录音当成已保存。
22
+
23
+ 模式切换只影响后续录音,不自动删除已保存文件,也不能恢复此前未保存的音频。录音中清空、新建或删除活动会议会中断本次录音并丢弃尚未完成的采集;应先正常结束并确认保存,再切换会议。
24
+
25
+ ## 导入已有音频
26
+
27
+ 在会议录音控制区点击 **导入录音**。接受 WAV、MP3、WebM、Ogg、M4A/MP4、FLAC 容器,单个文件最大 12 MiB,实际解码能力取决于所选 ASR 通道。成功后打开普通会议,继续生成标题、摘要和完善纪要;不会建立独立的音频文件库。
28
+
29
+ 账号模式下,保存模式决定是否同时保留原始文件;关闭时正常处理后删除暂存文件。访客只建立当前浏览器的文字会议,不保留原始文件。识别失败、空结果、取消或存储失败不会建立半成品会议。取消阻止结果提交,不代表可以立即中断第三方或正在执行的模型计算;取消未确认时应检查会议历史,勿重复提交。
30
+
31
+ ## 私有文件与清理
32
+
33
+ - 保留文件位于运行目录的 `data/meeting-audio/`,目录权限为 `0700`、文件为 `0600`,文件名由服务端生成。
34
+ - 播放和下载需要有效账号会话与会议所有权,不是匿名直链;只读数据 Token 不自动获得音频文件访问权。
35
+ - 清空会议会删除关联音频并使旧上传失效;删除会议也清理音频。清理失败会报告错误,不把残留当成删除成功。
36
+ - 已下载、导出、备份或第三方保存的副本需要分别管理。保存和使用录音前应确认使用授权。
37
+
38
+ ## 处理不等于归档
39
+
40
+ 麦克风或导入音频会经过浏览器、ChatVoice 和所选 ASR 服务。服务端可能使用 `temp/asr` 或 `temp/audio-uploads` 的临时文件解码、识别或上传校验,正常处理后清理。外部服务有自己的数据政策。“不保存录音”不代表音频不经过网络或磁盘,也不代表访客转写可离线运行。
41
+
42
+ 声音工作室的 TTS/复刻输出仍是当前任务的临时试听/下载结果;复刻参考需本人授权,不建立永久音色库或生成历史。实时对话的原始音频保留不属于会议保存模式。
43
+
44
+ ## 备份
45
+
46
+ `chatvoice data dump` 只备份 SQLite,不包含原始音频文件。使用保留模式时,先正常停止服务,再把数据库一致性快照与 `data/meeting-audio/` 一起备份和恢复;只恢复数据库不能恢复丢失的录音。代码回滚不得用旧数据库覆盖新记录。
47
+
48
+ [运行目录与备份](runtime-layout.md) · [权限与接口](api-access.md) · [网页使用](web-guide.md)
@@ -9,6 +9,8 @@ Keep installed code, persistent state and temporary processing files separate.
9
9
  | Account records | One SQLite file |
10
10
  | Guest records | Current-browser IndexedDB |
11
11
  | ASR intermediates | Runtime `temp/asr` |
12
+ | Explicitly retained meeting audio | Private files in `data/meeting-audio/`; SQLite stores relationships |
13
+ | Upload staging | `temp/audio-uploads/`, removed after normal processing |
12
14
  | Model cache | Runtime `model-cache` or explicitly selected model cache |
13
15
 
14
16
  ## Default layout
@@ -16,11 +18,13 @@ Keep installed code, persistent state and temporary processing files separate.
16
18
  ```text
17
19
  ~/.chatarch/chatvoice/
18
20
  ├── data/
19
- │ └── meetings.sqlite3
21
+ │ ├── meetings.sqlite3
22
+ │ └── meeting-audio/
20
23
  ├── logs/
21
24
  ├── run/
22
25
  ├── temp/
23
- │ └── asr/
26
+ │ ├── asr/
27
+ │ └── audio-uploads/
24
28
  └── model-cache/
25
29
  ```
26
30
 
@@ -41,9 +45,11 @@ Typed ChatEnv registration does not export values into arbitrary CLI processes.
41
45
  | `auth_sessions` | Session digests, CSRF and expiry |
42
46
  | `api_tokens` | Token digests, scopes, expiry and revocation |
43
47
  | `meeting_records` | Transcript, tags, summary/refinement history, Markdown Todo and Todo history |
48
+ | `meeting_audio_assets` | Owner, meeting, private storage key, format, size and source; no audio bytes |
49
+ | `meeting_import_requests` | Idempotency identifiers and pending/completed/failed/cancelled state |
44
50
  | `conversation_records` | Realtime conversation text and model/voice metadata |
45
51
 
46
- Transcript segments, tags and messages use JSON text columns; summaries and `todo_markdown` are document text. Raw recordings are not database fields. Old records have empty Todo content; clients omitting Todo fields do not clear stored values.
52
+ Transcript segments, tags and messages use JSON text columns; summaries and `todo_markdown` are document text. Recording bytes are not stored in SQLite; explicit retention writes private files associated by the asset table. Old records default to no retention, and clients omitting retention/Todo fields preserve existing values.
47
53
 
48
54
  Storage is single-node SQLite WAL. There is no implemented Postgres/MySQL switch; adding web workers is not a database migration.
49
55
 
@@ -55,6 +61,8 @@ chatvoice data dump --output "$HOME/.chatarch/chatvoice/backup.sqlite3" --json
55
61
 
56
62
  The command uses a consistent SQLite snapshot. Copying only the main database file during active writes can miss WAL state.
57
63
 
64
+ The command does not back up recording bytes. With retention enabled, stop the service normally and back up the snapshot together with `data/meeting-audio/`, preserving storage keys on restore. Restoring SQLite alone may leave unplayable asset metadata and cannot recover missing files.
65
+
58
66
  Restore replaces the active database. Stop the service first and verify the input:
59
67
 
60
68
  ```bash
@@ -9,6 +9,8 @@
9
9
  | 账号记录 | 一个 SQLite 文件 |
10
10
  | 访客记录 | 当前浏览器 IndexedDB |
11
11
  | ASR 中间文件 | 运行根目录的 `temp/asr` |
12
+ | 明确保留的会议音频 | `data/meeting-audio/` 私有文件;SQLite 保存关联元数据 |
13
+ | 音频上传暂存 | `temp/audio-uploads/`,正常处理结束后清理 |
12
14
  | 模型缓存 | 运行根目录的 `model-cache` 或显式指定的模型缓存 |
13
15
 
14
16
  ## 默认布局
@@ -16,11 +18,13 @@
16
18
  ```text
17
19
  ~/.chatarch/chatvoice/
18
20
  ├── data/
19
- │ └── meetings.sqlite3
21
+ │ ├── meetings.sqlite3
22
+ │ └── meeting-audio/
20
23
  ├── logs/
21
24
  ├── run/
22
25
  ├── temp/
23
- │ └── asr/
26
+ │ ├── asr/
27
+ │ └── audio-uploads/
24
28
  └── model-cache/
25
29
  ```
26
30
 
@@ -41,9 +45,11 @@ ChatEnv 中登记了路径字段,但并不会替任意 CLI 进程自动导出
41
45
  | `auth_sessions` | 会话摘要、CSRF 与过期时间 |
42
46
  | `api_tokens` | Token 摘要、scope、有效期、撤销状态 |
43
47
  | `meeting_records` | 转写、标签、摘要、纪要对话、Markdown Todo 与 Todo 对话 |
48
+ | `meeting_audio_assets` | owner、会议、私有 storage key、格式、字节数与来源;不保存音频正文 |
49
+ | `meeting_import_requests` | 导入幂等标识与待处理、完成、失败、取消状态 |
44
50
  | `conversation_records` | 实时对话文字与模型/音色元数据 |
45
51
 
46
- 转写片段、标签与对话消息用 JSON 文本列保存;摘要与 `todo_markdown` 是正文文本。原始录音不是数据库字段。Todo 为空的旧记录仍可读取,旧客户端省略 Todo 字段不会清空它们。
52
+ 转写片段、标签与对话消息用 JSON 文本列保存;摘要与 `todo_markdown` 是正文文本。原始录音字节不在数据库中,明确选择保留时写入私有文件并由资产表关联。旧记录默认不保留录音,旧客户端省略保存模式和 Todo 字段时不会清空已有值。
47
53
 
48
54
  当前存储是单节点 SQLite WAL。Postgres/MySQL 没有可用切换配置;不要把增加进程数当作数据库迁移。
49
55
 
@@ -55,6 +61,8 @@ chatvoice data dump --output "$HOME/.chatarch/chatvoice/backup.sqlite3" --json
55
61
 
56
62
  备份使用 SQLite 一致性快照。不要在写入时仅复制主 `.sqlite3` 文件而忽略 WAL 状态。
57
63
 
64
+ 该命令不备份原始音频。使用保留模式时先正常停止服务,把数据库快照与 `data/meeting-audio/` 一起备份;恢复时保持相同 storage key。只恢复 SQLite 会留下无法播放的资产元数据,不能恢复丢失的录音文件。
65
+
58
66
  恢复会替换当前数据库。先正常停止服务,再确认目标和备份:
59
67
 
60
68
  ```bash
@@ -5,6 +5,7 @@ Speakr has three top-level modes: **meeting recording, voice studio and realtime
5
5
  | Goal | Entry | Stored content |
6
6
  | --- | --- | --- |
7
7
  | Capture ideas or a meeting | Recording / transcript | Text, title and tags |
8
+ | Import existing audio or retain a recording | Recording mode and import controls | Text by default; explicit account audio retention |
8
9
  | Summarize and refine wording | Summary / note refinement | Summary and refinement conversation |
9
10
  | Build an action plan | Convert to Todo below the summary | Markdown Todo and its conversation |
10
11
  | Synthesize speech | Voice studio | Temporary preview/download, not generation history |
@@ -20,12 +21,22 @@ Account and guest data do not automatically migrate between modes. Sending audio
20
21
  ## Record and transcribe {#recording}
21
22
 
22
23
  1. Create a meeting and check the ASR channel in settings.
23
- 2. Start recording and grant microphone access. Remote access should use HTTPS.
24
+ 2. Check recording mode: transcription-only is the default, while accounts can explicitly retain original audio. Start recording and grant microphone access; use HTTPS remotely.
24
25
  3. Pause and let the current recognition window commit; resuming continues the same meeting.
25
- 4. Finish and wait for the last recognition result before reviewing the summary.
26
+ 4. Finish and wait for the last recognition result. When retention is enabled, also wait for the saved-audio confirmation before reviewing playback/download and notes.
26
27
 
27
28
  Edit or refresh the title, add tags, and open saved history. Copying a transcript does not export raw audio. Clearing, creating or deleting an active meeting interrupts recording resources; confirm that you intend to discard the active state.
28
29
 
30
+ Mode is locked during recording. Only the owner can play or download retained audio. Switching retention off does not delete earlier files; clearing or deleting the meeting does. A later recording pass creates another audio asset, whereas pause/resume stays in the same pass. Archives are limited to 128 MiB and failures/limits have visible explanations.
31
+
32
+ ## Import existing audio {#audio-import}
33
+
34
+ 1. Choose whether to retain the original, then use the audio-import control to select a local file.
35
+ 2. WAV, MP3, WebM, Ogg, M4A/MP4 and FLAC are accepted up to 12 MiB per file; the configured ASR channel must support decoding the selected format.
36
+ 3. The page shows upload/recognition status and a cancel control. Success opens a normal meeting for titles, summaries, note refinement and Todo.
37
+
38
+ Original-file retention defaults off. Account opt-in enables owner-protected playback/download; guests only store browser-local text meetings. Empty, invalid, oversized, failed or cancelled imports create no new meeting. Check history instead of resubmitting if cancellation was not confirmed; model computation may still need to finish normally. See [retention and backup](recording-storage.md).
39
+
29
40
  ## Summarize and refine {#summary}
30
41
 
31
42
  The summary view supports update and copy. Note refinement provides an editable canvas and a conversation panel for audience changes, emphasis, action items and omissions. Manually or conversationally customized notes are not automatically overwritten by resumed recording. Explicit regeneration still needs review.
@@ -5,6 +5,7 @@ Speakr 的顶层入口是 **会议记录、声音工作室、实时对话**。
5
5
  | 目标 | 入口 | 保存对象 |
6
6
  | --- | --- | --- |
7
7
  | 留下语音想法或会议内容 | 会议记录 → 文字记录 | 转写文字、标题、标签 |
8
+ | 导入已有录音或保留会议音频 | 会议录音区的模式与导入控件 | 默认只保存文字;账号可明确保留音频 |
8
9
  | 总结与修改表达 | 实时摘要 / 完善纪要 | 摘要正文与完善对话 |
9
10
  | 整理可执行计划 | 摘要下方“转为 Todo” | Markdown Todo 与完善对话 |
10
11
  | 让文字变成声音 | 声音工作室 | 本次试听/下载结果,不建立生成历史 |
@@ -20,12 +21,22 @@ Speakr 的顶层入口是 **会议记录、声音工作室、实时对话**。
20
21
  ## 录音与转写 {#recording}
21
22
 
22
23
  1. 新建会议,确认设置中的识别通道可用。
23
- 2. 点击录音并允许浏览器使用麦克风。远程访问应使用 HTTPS。
24
+ 2. 确认录音模式。默认只做语音识别;登录后可选择“保存原始录音”。点击录音并允许浏览器使用麦克风,远程访问使用 HTTPS。
24
25
  3. 暂停时等待当前识别片段提交;继续录音后文字仍归入本条会议。
25
- 4. 结束后等待最后一段识别完成,再检查转写和摘要。
26
+ 4. 结束后等待最后一段识别完成;开启保存时还需等到原始录音保存确认,再检查转写、摘要和录音播放/下载。
26
27
 
27
28
  可修改会议标题、手动刷新标题、添加标签,并从历史列表打开记录。复制文字只复制转写,不导出原始音频。清空、新建或删除活动会议会中断当前录音资源,应先确认内容是否需要保留。
28
29
 
30
+ 录音中的模式不可切换,已保存音频只有所属账号能播放或下载。关闭保存模式不删除此前文件;清空或删除会议才清理关联录音。正常结束后再次开始录音会保存为另一段音频,暂停/继续则保持同一段。归档上限 128 MiB,失败或超限会显示原因。
31
+
32
+ ## 导入已有录音 {#audio-import}
33
+
34
+ 1. 先选择是否保存原始录音,再点击 **导入录音** 选择本地文件。
35
+ 2. 支持 WAV、MP3、WebM、Ogg、M4A/MP4、FLAC,单文件最大 12 MiB;所选 ASR 通道必须具备对应解码能力。
36
+ 3. 页面显示上传和识别状态,可点击 **取消导入**。成功后打开普通会议,继续使用标题、摘要、完善纪要和 Todo。
37
+
38
+ 默认不保留原始文件;账号明确开启后可播放/下载,访客只保存当前浏览器文字会议。空文件、错误、超限、取消或存储失败不留下新会议。取消未确认时检查历史,不重复提交;模型计算可能仍需正常结束。详见[保留边界与备份](recording-storage.md)。
39
+
29
40
  ## 摘要与完善纪要 {#summary}
30
41
 
31
42
  - **实时摘要**显示生成结果,支持主动更新和复制。
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ChatVoice
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: ChatArch voice recording, transcription, and meeting-notes toolkit.
5
5
  Author-email: ChatArch <rex@chatarch.org>
6
6
  License-Expression: MIT
@@ -60,7 +60,7 @@ ChatVoice 是 ChatArch 的录音转写与会议工作区 Python 包,包含 Spe
60
60
  要求 Python 3.10 或更高版本,建议安装到独立虚拟环境。
61
61
 
62
62
  ```bash
63
- python -m pip install "ChatVoice[web]==0.2.0"
63
+ python -m pip install "ChatVoice[web]==0.3.0"
64
64
  chatvoice --version
65
65
  chatvoice --tree
66
66
  chatvoice serve app --dry-run --json
@@ -70,7 +70,8 @@ chatvoice serve app --dry-run --json
70
70
 
71
71
  ## 当前能力
72
72
 
73
- - **会议记录**:实时转写、暂停与继续、会议标题、标签、历史记录和复制文字。
73
+ - **会议记录**:实时转写、暂停与继续、会议标题、标签、历史记录和复制文字。默认只做语音识别;登录后可选择保存原始录音,随会议播放或下载。
74
+ - **录音导入**:导入不超过 12 MiB 的已有音频,经当前 ASR 通道转写后建立普通会议,继续生成标题、摘要和完善纪要。原始文件默认不保留,可明确选择保存。
74
75
  - **摘要与纪要**:生成摘要,手动编辑纪要,或通过对话修改并撤销。
75
76
  - **Markdown Todo**:由用户点击“转为 Todo”,在独立页面继续编辑、对话完善、复制或下载 `.md`;不会自动转换或执行任务。
76
77
  - **声音工作室**:配置系统音色与输出格式;通过独立声音复刻服务,以授权参考音频生成临时试听结果。
@@ -81,7 +82,9 @@ chatvoice serve app --dry-run --json
81
82
 
82
83
  ## 数据与安全边界
83
84
 
84
- 账号记录保存到 `~/.chatarch/chatvoice` 下的 SQLite;访客记录仅存于当前浏览器。录音会为识别而短暂经过浏览器和服务端,但不作为会议音频档案保存。密钥不进入浏览器。
85
+ 账号记录保存到 `~/.chatarch/chatvoice` 下的 SQLite;访客记录仅存于当前浏览器。原始录音默认不保存;登录用户明确开启后,文件私有保存到会议名下,播放、下载和删除均校验所有权。访客不能保存服务器录音。密钥不进入浏览器。
86
+
87
+ 清空或删除会议会清理关联录音;切换保存模式不删除已有文件,也不能恢复此前未保存的音频。数据库备份不包含录音文件,保留原始录音时须同时备份私有音频目录。
85
88
 
86
89
  自助注册关闭,由部署者创建受邀账号。ChatVoice 直接依赖 ChatLogin 0.1.2 的内建 `ChatVoiceAuth`,复用既有账号、会话和 CSRF;`/login` 使用可定制的共享 `LoginUI`。会议所有权和 Token 权限仍由 ChatVoice 控制,访客草稿等待 IndexedDB 事务提交后才跳转登录。详见[数据保留边界](https://arch.gh.wzhecnu.cn/ChatVoice/recording-storage/)。
87
90
 
@@ -88,10 +88,12 @@ src/chatvoice/web/auth_adapter.py
88
88
  src/chatvoice/web/legacy_app.py
89
89
  src/chatvoice/web/login_ui.py
90
90
  src/chatvoice/web/server.py
91
+ src/chatvoice/web/upload_limits.py
91
92
  src/chatvoice/web/static/index.html
92
93
  src/chatvoice/web/static/login-brand.css
93
94
  src/chatvoice/web/static/transcript-state.js
94
95
  tests/conftest.py
96
+ tests/nonbrowser_audio_import.cjs
95
97
  tests/nonbrowser_flows.cjs
96
98
  tests/nonbrowser_harness.cjs
97
99
  tests/nonbrowser_realtime_error.cjs
@@ -108,11 +110,16 @@ tests/test_documented_interfaces.py
108
110
  tests/test_live_acceptance_contract.py
109
111
  tests/test_live_exchanges.py
110
112
  tests/test_login_service.py
113
+ tests/test_meeting_audio_edges.py
114
+ tests/test_meeting_audio_import.py
115
+ tests/test_meeting_audio_import_frontend.py
116
+ tests/test_meeting_audio_storage.py
111
117
  tests/test_nonbrowser_flows.py
112
118
  tests/test_nonbrowser_routes.py
113
119
  tests/test_nonbrowser_runner_contract.py
114
120
  tests/test_public_docs_contract.py
115
121
  tests/test_realtime_provider_errors.py
122
+ tests/test_recording_retention_frontend.py
116
123
  tests/test_runtime_cli.py
117
124
  tests/test_runtime_env.py
118
125
  tests/test_shared_login.py
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.2.0"
5
+ __version__ = "0.3.0"