Invoice-Downloader
EthanYoQ
电子发票整理与报销准备工具:从邮箱批量收集 PDF/OFD/XML 发票,OCR 识别、分类归档并生成 Excel 汇总;提供 Windows/macOS 桌面版与 DSH 插件。
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:CC2027MK2/dsh-watch-phone
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Hold-to-talk chat between an Android smartwatch — or any other Android phone — and DeepSeek Harness running on your phone (or on a PC — anything that runs DSH).
Press the green pill, speak, release: the audio is transcribed on the DSH host, the transcript lands in the text box so you can fix what the recogniser misheard, and after you press send it goes to a real DSH session (the same one you see in the app, with your preset, persona and model). The reply is spoken back with a local TTS voice. No cloud round-trip for the client itself, and no keyboard on a 240 dp round screen.
One APK serves both: the layout is a two-row composer below 320 dp of width (the watch) and a normal single-row composer above it (every phone), so a second handset can talk to the same bridge without a second build.
watch APK ──HTTP──▶ this plugin (0.0.0.0:38402)
│ ├─ POST /chat → DSH agent session → reply text
│ ├─ POST /stt → ctx.get('speechToText') (local ASR)
│ └─ POST /tts → MiMo speech API (local cache) or fallback proxy
└─ bundled at /watch/app.apk
speechToText service (e.g. the official
@deepseek-ai/dsh-experimental-speech-to-text-sensevoice bundle). Without it /stt
returns 503 and the watch reports “没听清,再说一次”.sk-… key (https://api.xiaomimimo.com/v1),
or set proxyBase to another machine that answers /tts.# 1. the bridge
dsh plugin --profile <your-profile> add dsh-watch-phone
# 2. the watch app: the bundle ships the APK, fetch it from the bridge
curl -O http://<host>:38402/watch/app.apk
adb install -r app.apk
adb shell pm grant com.dsh.watchchat android.permission.RECORD_AUDIO
The client finds the host by itself, on whatever network the two devices happen to share — hotspot, home Wi-Fi, office Wi-Fi, a new subnet after DHCP moved the phone. In order it tries:
dsh-watch? on port 38403 with
{"service":"dsh-watch-phone","port":38402,"urls":[…]},_dsh-watch._tcp.local,Anything it finds is verified with GET /health before being adopted, so a stale address is
never silently kept. You can also type an address in — tap the status line at the top, or
long-press the chat area.
The prebuilt APK is only signed with a throwaway key, so rebuild it if you want to change the
UI. The full Android source lives in watch-app/ — JDK 17, Gradle 8.7
(wrapper included), SDK 34:
cd watch-app
echo "sdk.dir=/path/to/Android/Sdk" > local.properties
./gradlew assembleRelease # add keystore.properties to sign it
adb install -r app/build/outputs/apk/release/app-release.apk
The watch has no text-to-speech service and no SpeechRecognizer (Xiaomi ships neither),
which is exactly why all speech work happens on the phone: the watch records a WAV, posts it to
/stt, shows the reply, and plays whatever /tts returns.
| Path | What it is |
|---|---|
index.js, cordis.patch.yml, locale/, docs/, icon.svg |
the plugin bundle itself (dsh.bundle.patch) |
assets/dsh-watch-chat.apk |
the prebuilt watch client served by GET /watch/app.apk |
watch-app/ |
full Android source of that client (Gradle project, no keystore) |
pc-bridge/ |
the desktop-only predecessor: a PC DSH plugin with Vosk speech-to-text and SAPI text-to-speech, plus the /relay TCP helper used to reach a watch's wireless-debugging port from another subnet |
.github/workflows/build-watch-app.yml |
compiles watch-app/ on every push and uploads the unsigned APK |
.github/workflows/publish.yml |
publishes the bundle to npm through Trusted Publishing (OIDC, no token) |
Everything in this repository is sanitised: addresses are documentation ranges
(RFC 5737 — 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24), Wi-Fi names and hotspot
passwords are placeholders, and no keystore, device serial or machine path is committed.
pc-bridge/ resolves its paths from the file location or from
DSH_WATCH_BRIDGE_DIR / DSH_PHONE_DIR / DSH_PYTHON.
Add these keys to the bundle's row config (cordis.patch.yml):
| Key | Default | Meaning |
|---|---|---|
port |
38402 |
HTTP listen port (all interfaces). |
discoveryPort |
38403 |
UDP port that answers the client's dsh-watch? broadcast with the bridge's URLs. |
token |
'' |
When set, every route except /health, /log and /watch/app.apk requires Authorization: Bearer <token>. |
sessionId |
watch-voice |
DSH session id the watch talks to. Reused if it already exists. |
cwd |
process.cwd() |
Working directory for that session. |
allowExec |
false |
Enables POST /exec (shell on the host). Leave off unless you know why. |
allowRelay |
false |
Enables POST /relay (raw TCP relay, used to reach a watch on another subnet). |
proxyBase |
'' |
Fallback host for /stt and /tts, e.g. http://192.0.2.10:38401. |
logFile |
<home>/.dsh/watch-phone/bridge.log |
Bridge log; recordings are archived next to it in rec/. |
tts.apiKey |
— | MiMo key. If omitted, the plugin reads the local-voice plugin's saved settings (/root/.dsh/dsh-go/plugins/local-voice/data/settings.json). |
tts.baseURL |
https://api.xiaomimimo.com/v1 |
MiMo endpoint. |
tts.model |
mimo-v2.5-tts |
Also supports mimo-v2.5-tts-voicedesign. |
tts.voice |
BingTang |
Voice id (e.g. 冰糖). |
tts.instruction |
'' |
Optional style instruction sent as the first message. |
Example that keeps the shell off but pins the voice:
- id: watch-phone
name: dsh-watch-phone
config:
port: 38402
sessionId: watch-voice
tts:
apiKey: sk-...
voice: 冰糖
| Route | Method | Body | Result |
|---|---|---|---|
/health |
GET | — | { ok, service, host, platform, uptime, stt, chat, features } |
/chat |
POST | {"text":"…"} |
{ ok:true, reply } — goes through a real DSH session when @deepseek-ai/dsh-agent is resolvable, otherwise straight to the model |
/stt |
POST | multipart (audio) or raw WAV |
{ ok, text, bytes, language, seconds, peak, gain } |
/tts |
POST | {"text":"…"} |
audio/wav bytes |
/reset |
POST | — | clears the conversation |
/log |
GET | ?lines=80 |
tail of the bridge log |
/watch/app.apk |
GET | — | the bundled watch APK |
/exec |
POST | {"cmd":"…"} |
{ ok, code, stdout, stderr, ms } — needs allowExec |
/relay |
POST/GET | {port,targetHost,targetPort} |
starts / lists TCP relays — needs allowRelay |
/config |
GET/POST | {"allowExec":true} |
loopback only: read or flip the runtime switches; remembered in ~/.dsh/watch-phone/settings.json |
allowExec and allowRelay deliberately cannot be turned on from the LAN. On a phone you
reach loopback with adb, so the switch stays available without exposing it:
adb forward tcp:13842 tcp:38402
curl -s http://127.0.0.1:13842/config # read
curl -s -X POST http://127.0.0.1:13842/config -d '{"allowExec":true}' # enable
This is how the watch is deployed over a hotspot: allowRelay lets the host open a TCP
tunnel to the watch's wireless-debugging port while adb stays on the PC.
/stt normalises any WAV to 16 kHz mono 16-bit and lifts quiet recordings
(peak < 6000 → up to 40× gain), because watch microphones record very low.text parts — reasoning and tool calls are never spoken.<dsh home>/sessions/*/<sessionId> and it is recreated.token if the network is not trusted, and keep
allowExec/allowRelay off by default.MIT. The bundled APK is built from watch-app/ in the same project and carries the same
license; see assets/SOURCE.md.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: chat。