Skip to content

Traditional Chinese output is not enforced when ASR or streaming insertion returns Simplified Chinese #622

Description

@MurrayWen

现象

當 Chinese Script Preference 設為 Traditional 時,OpenLess 最終插入的文字仍可能包含簡體中文。

觸發條件:

  • Chinese Script Preference: Traditional
  • 使用中文語音輸入
  • ASR 或 LLM 輸出中包含簡體中文
  • Streaming insertion 可能開啟
  • 使用 OpenAI-compatible local endpoint 或其他 LLM provider

當前表現:
輸入或 ASR 結果中包含簡體中文時,最終插入文字仍保留簡體字。

證據:

ASR / input text:

你知道你今天想要做什么吗?
所以你已经考过了吗?

Actual output:

你知道你今天想要做什么吗?
所以你已经考过了吗?

Expected output:

你知道你今天想要做什麼嗎?
所以你已經考過了嗎?

### 影响

## 影響

這會影響繁體中文使用者,尤其是台灣使用者。

當使用者已經選擇 Traditional Chinese output 時,最終插入到應用程式的文字應該穩定輸出繁體中文,而不是混入簡體中文。

Prompt-level instructions 不夠穩定,因為部分 LLM provider 可能會跟隨 ASR 的簡體輸入,繼續輸出簡體中文。

這會造成以下問題:
- 使用者需要手動把簡體中文改成繁體中文。
- 中英對照、語音整理、正式文字輸出會不一致。
- Traditional 模式的預期行為不穩定。
- 對台灣繁體中文工作流不友善。

### 建议接受标准


- [ ] 當 Chinese Script Preference 設為 Traditional 時,最終插入文字必須輸出繁體中文。
- [ ] ASR transcript 在送進 LLM polish pipeline 前,應先套用 Chinese script conversion。
- [ ] LLM polish 完成後、插入文字前,應再次套用 Chinese script conversion。
- [ ] 最終插入文字不應包含由 ASR 或 LLM 產生的簡體中文。
- [ ] Auto 模式保持目前行為,不要強制轉換。
- [ ] 如果 Streaming insertion 無法安全套用 script conversion,應自動 fallback 到 one-shot insertion,或先 buffer 完整 streaming output,再轉換後插入。
- [ ] 以下測試案例應通過:

Input:
你知道你今天想要做什么吗?

Expected:
你知道你今天想要做什麼嗎?


Input:
所以你已经考过了吗?

Expected:
所以你已經考過了嗎?

TODO / 不确定项

需要確認 streaming insertion 路徑是否會跳過 apply_chinese_script_preferenceapply_correction_rules

需要確認 Traditional 模式下,是否應在 ASR 後與 LLM polish 後各套用一次 Chinese script conversion。

需要確認如果 streaming insertion 開啟,Traditional 模式應採用哪一種處理方式:

  1. 自動 fallback 到 one-shot insertion。
  2. 先 buffer 完整 streaming output,轉換為繁體中文後再插入。

我不確定目前所有 provider 的行為是否一致,但在使用 OpenAI-compatible local endpoint / LLM polish 時,可以觀察到最終輸出仍可能包含簡體中文。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions