A Windows PySide6 workspace for DeepSeek API/Web translation, long SRT continuation, visible-answer capture, history, export, and distributable desktop packaging.
The repository also builds DeepSeek Conversation Capture, a stripped standalone edition for everyday DeepSeek Web prompts and visible-answer capture.
- PySide6 workspace with source editor, prompt templates, editable prefix/suffix, final-prompt preview, result view, history, logs, and dark-mode support.
- Defaults to DeepSeek Web and can switch between Web and OpenAI-compatible API modes.
- Supports translation/SRT automation and general conversation capture task modes.
- Stores prompt templates, history, and Web capture versions in SQLite.
- Exports TXT, Markdown, and SRT; SRT export writes translated text with UTF-8 BOM.
- API mode can list models and test credentials through
{API Base URL}/modelswithout making a chat-completion request.
- Starts from
conversation_main.pyand fixes requests toengine = webandtask_mode = general_capture. - Keeps prompt sending, visible Web answer capture, stop/cleanup, automatic continuation after truncation, account-profile switching, history, and TXT/Markdown export.
- Omits API settings, task-mode selection, SRT export, and subtitle completion controls.
- Uses a separate
%LOCALAPPDATA%\DeepSeekConversationCapturedata directory so it does not mix state with the full studio.
- Windows desktop environment.
- Python 3.12 or newer.
- PySide6, Playwright, Loguru, pytest, and PyInstaller as listed in
requirements.txt. - Playwright Chromium for Web mode. Installing it downloads a browser runtime.
py -3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m playwright install chromiumThe repository also provides:
python scripts\install_playwright.pypython main.py
python conversation_main.pyFor first-time Web use, sign in manually when DeepSeek opens. Automatic login, CAPTCHA bypass, and access-control circumvention are outside the project scope.
Web mode uses a Playwright persistent context and captures only text already visible in the page DOM. It does not rely on the clipboard or hidden API responses.
- The full studio stores its browser profile under
%LOCALAPPDATA%\DeepSeekTranslationStudio\browser_profile. - “Switch Web account” moves the current profile into
browser_profile_backupsand creates a fresh profile. It is disabled while a task is running. - Visible mutations and snapshots are recorded in
web_capture_versions; successful continuation clicks updatehistory.continue_click_count. - The engine recognizes visible
继续生成,继续,Continue, andContinue generatingcontrols only after a safe truncation state. It does not click login, registration, payment, deletion, or unrelated “continue” controls. - General capture treats even SRT-looking input as ordinary conversation and never enables SRT cleanup or completion logic.
If DeepSeek reports that the server is busy and shows a continuation control, the engine waits approximately 180 seconds between retries and clicks only “continue generation”. It does not select fast mode or disable the user's deep-thinking quality setting.
For translation/SRT tasks, the service tracks coverage by subtitle identity and timecode rather than text length.
- It captures visible SRT-like DOM blocks, discards incomplete number/timecode fragments, and prefers newer complete captures for the same subtitle.
- Source-copy protection rejects unchanged nontrivial source subtitles. Short Chinese numbers/names and punctuation or symbols such as
♪and...may remain unchanged when that is a valid translation. - Completion requires all source subtitles with no internal gap; the UI displays
covered/total. - A truncated tail continues in the current conversation first. Large internal gaps restart from the first missing region; small gaps are requested explicitly after the tail is complete.
- When the current conversation reaches its continuation limit, the service recalculates actual coverage before opening a new page for missing subtitles only.
- Refusals, reasoning text, requirement analysis, controls, and DeepSeek footer text are excluded from the final SRT. An incomplete result is saved with warning status rather than presented as complete.
- Closing the browser cancels the task while retaining valid text already captured. Pressing Stop asks the page to stop and then organizes the current partial result.
Configure API Key, Base URL, and model in the UI, or set defaults before launching the full studio:
$env:DEEPSEEK_API_KEY="your-key"
$env:DEEPSEEK_API_BASE="https://api.deepseek.com"
$env:DEEPSEEK_MODEL="deepseek-chat"
python main.pyThe API key is not written to history or logs. Model listing and connection testing run off the PySide6 main thread and use only the /models endpoint.
Prompt templates are seeded from src/resources/default_prompts.json and stored in SQLite. An editable template must contain:
{{TEXT}}
Default full-studio data directory:
%LOCALAPPDATA%\DeepSeekTranslationStudio
It contains studio.sqlite3, browser_profile/, and logs/studio.log. Override it with DST_APP_DATA_DIR. Override the stripped edition with DCC_APP_DATA_DIR.
$env:DST_APP_DATA_DIR="D:\runtime\translation-studio"
$env:DCC_APP_DATA_DIR="D:\runtime\conversation-capture"Do not commit API keys, Authorization headers, cookies, SQLite databases, logs, browser profiles, or downloaded build tools.
pytestThe repository has focused tests for UI/service behavior, capture filtering, browser profiles, API requests, export, prompt/history services, cancellation, and extensive SRT continuation/merge edge cases. No lint or format command was found.
Entrypoint smoke modes also exist:
python main.py --smoke-test
python main.py --playwright-smoke-test
python conversation_main.py --smoke-testpython scripts\build_exe.py
python scripts\build_conversation_exe.pyExpected application folders:
dist\DeepSeek Translation Studio\DeepSeek Translation Studio.exe
dist\DeepSeek Conversation Capture\DeepSeek Conversation Capture.exe
Keep the entire folder. Web mode needs the bundled _internal\playwright\...\.local-browsers\chromium-* runtime; copying only the EXE will not work.
Expected packages:
dist\packages\DeepSeek Translation Studio-0.1.0.msi
dist\packages\DeepSeek Translation Studio-0.1.0-portable.zip
dist\packages\DeepSeek Conversation Capture-0.1.0.msi
dist\packages\DeepSeek Conversation Capture-0.1.0-portable.zip
The portable launchers point DST_APP_DATA_DIR or DCC_APP_DATA_DIR at a sibling data\ directory. PyInstaller creates the Windows applications; WiX Toolset 3.14 is downloaded to .build_tools when needed for MSI creation. Release packages include the main Chromium build, not chromium_headless_shell-*, to avoid Windows path-length failures.
Publish the four packages with:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\publish_github_release.ps1The script targets NextWeb4/deepseek-translation-studio and tag v0.1.0; credentials are read at runtime and are not stored in the repository, remote, or logs.
| Path | Responsibility |
|---|---|
main.py, conversation_main.py |
Full and stripped application entry points |
src/ui/ |
PySide6 windows, widgets, and theme |
src/services/ |
Translation orchestration, capture, SRT merging, profiles, prompts, history, and export |
src/engines/ |
DeepSeek API and Playwright Web engines |
src/database/ |
SQLite schema, initialization, migration, and repositories |
src/models/ |
Prompt, history, and task models |
src/config/ |
Constants and runtime settings |
tests/ |
pytest regression suites |
scripts/ |
Browser setup, application packaging, and GitHub release publication |
OCR, PDF translation, DOCX batch translation, translation memory, multiple model providers, a complex theme system, and a plugin system are not implemented.
No LICENSE file was found in the audited repository. Dependency distribution obligations still apply: PySide6 licensing must be evaluated for distribution; Playwright is Apache-2.0; PyInstaller uses GPL-2.0-or-later with its bootloader exception; WiX 3.14 uses the Microsoft Reciprocal License.

