Skip to content
dsh.fish
Bundle

dsh-stt

DSH plugin: speech-to-text input via microphone or file upload, transcribed through an OpenAI-compatible /v1/audio/transcriptions endpoint.

Source
jackuh105
Updated
Updated 6 days ago

Readme

# dsh-stt

DSH 語音轉文字外掛:在聊天輸入區提供麥克風錄音/音訊檔上傳,以 OpenAI 相容的 `/v1/audio/transcriptions` 端點轉錄後插入輸入框。

- PRD:`docs/prd.md`(需求、架構決策、測試決策)
- 計畫:`docs/plan.md`(分階段縱切與驗收)
- 階段紀錄:`docs/findings-phase-1.md` 起,每階段一份實作發現

## 安裝

```sh
# 自本專案目錄
dsh plugin --profile web add .
```

安裝後**重啟 `dsh web` host 程序**(client 模組快取不重掃),再刷新頁面。解除安裝:

```sh
dsh plugin --profile web remove dsh-stt
```

## 目前進度

| Phase | 內容 | 狀態 |
| --- | --- | --- |
| 1 | Walking skeleton:輸入區顯示(尚無功能)的麥克風按鈕 | ✅ 已完成(含瀏覽器驗收) |
| 2 | 設定面板與持久化設定(含測試連線) | ✅ 已完成(含瀏覽器驗收:FunASR 兩段式探測成功) |
| 3 | 上傳音訊檔 → 轉錄 → 插入 | ✅ 程式碼與測試完成(功能已併入 Phase 4 UI) |
| 4 | 麥克風錄音 → 轉錄 → 插入(含 host 同源代理,遠端 mixed content 已解) | ✅ 錄音流程已驗收;代理待重啟驗證 |
| 5 | 錯誤處理、取消、邊界情境、無障礙與主題 | ✅ 程式碼與測試完成;瀏覽器驗收待 host 重啟 |

## 開發

```sh
node --test        # 純邏輯模組 + client bundle factory 契約測試
```

Client 端為手寫 `window.__ModuleLoader__.load({ id, factory })` 成品(無 build step),先例:remielle-dsh、dsh-message-edit。

Install

dsh plugin --profile web add github:jackuh105/dsh-stt

Profile: web

  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source