songjongdevsecops/dsh-escutar ↗★ 0
dsh-escutar
语音条转写一致性校验与语义检索工具 适合需要校验语音转写准确性,或通过语义搜索音频内容的用户。
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:songjongdevsecops/dsh-escutar說明文件
閱讀完整 README ↗Usage
| Who | How | What you get |
|---|---|---|
| the agent | conferir_transcricao tool | check one note (id) or search the audio by meaning (consulta) |
| you | /escutar command | recent notes with a suspicious transcript |
| the agent | agent/pre-step hook | a short warning at the end of the conversation when a recent note is suspicious; nothing is appended when there is no suspicion, so it costs zero tokens |
conferir_transcricao { "id": "001" } # is this note trustworthy?
conferir_transcricao { "consulta": "what did I say about backup" } # search the audio
/escutar # recent suspicious notes
Verdicts
The verdict is the cosine between the audio vector and the transcript vector:
| Verdict | When |
|---|---|
suspeita | cosine 0.78 + 0.03 |
sem-medida | no number (CLI failure, corrupt cache) |
A note on the edge of the threshold is reported as incerta on purpose: it is
neither an alarm nor a pass.
Configuration
Every key falls back to a default, so a wrong config never breaks the plugin.
Override the row by id in your profile patch
(~/.dsh/profiles/web/cordis.patch.yml; on Windows,
%USERPROFILE%\.dsh\profiles\web\cordis.patch.yml). A patch replaces the
whole config of the row, so restate every key you want to keep:
- id: escutar
config:
corpus: '/path/to/voice-corpus'
cache: '/path/to/discordancia.json'
gemma: '/path/to/embeddinggemma'
limiar: 0.78
banda: 0.03
maxAvisos: 2
colecaoAudio: 'escutar-audio-gemma-v1'
tempoLimiteMs: 120000
| Key | Default | Meaning |
|---|---|---|
workspace | package directory | base for the corpus and cache defaults |
corpus | /corpus | folder with the audio/transcript pairs |
cache | /estado/discordancia.json | cache read by /escutar and the hook |
gemma | DSH_ESCUTAR_GEMMA_BIN, then ~/.local/bin/embeddinggemma (embeddinggemma.exe on Windows) | EmbeddingGemma CLI |
limiar | 0.78 | cosine below which the transcript is suspicious |
banda | 0.03 | uncertainty margin around the threshold |
maxAvisos | 2 | maximum lines the hook appends; 0 disables it |
colecaoAudio | escutar-audio-gemma-v1 | index name used by consulta |
tempoLimiteMs | 120000 | timeout for one CLI call |
The DSH_ESCUTAR_GEMMA_BIN variable is used when gemma is not set in the
config. The package carries no machine-specific path.
Index and cache
The plugin reads two artifacts; it does not build them:
-
Audio index (
colecaoAudio, defaultescutar-audio-gemma-v1) — needed only byconferir_transcricaowithconsulta. Build it with the EmbeddingGemma CLI:embeddinggemma indexar /path/to/corpus/audio \ --nome escutar-audio-gemma-v1 --ext ogg,opus,mp3,wav,m4aThe audio encoder reads roughly the first 30 seconds of each file. If you need long notes sliced into windows, slice them before indexing.
-
Discordance cache (
cache) — needed by/escutarand the hook. It is a JSON file written by your indexing pipeline:{ "gerado_em": "2026-10-13T12:00:00+00:00", "notas": [ { "id": "001", "cosseno": 0.84, "transcricao": "first 200 characters of the transcript", "mtime": "2026-10-13T11:59:00+00:00", "mtime_texto": "2026-10-13T11:59:00+00:00", "janelas": [0.84], "segundos": 12 } ] }mtimeandmtime_textoare the modification times of the audio and the transcript when the cosine was measured. The tool checks them on every read: a cache without them, or older than the files on disk, is not served as current — the note is measured again on the spot. The hook only warns about notes whosemtimeis within the last 48 hours.
Without an index or a cache, conferir_transcricao with id still works: it
measures the pair live (about 11 s to load the model, plus a few seconds per
note). /escutar and the hook stay quiet and say what is missing.