Skip to content

[BUG]Input Lag with Chinese Voice IMEs' AI Correction Feature #2683

@Oblivious0214

Description

@Oblivious0214

Bug Description
The Chatbox input field experiences significant lag or freezes when using Chinese voice input methods (like iFlytek or Sogou). This occurs when the IME's AI correction feature processes and replaces the entire text block after the user stops speaking. The issue is more pronounced with longer text inputs, especially those containing line breaks.

Steps to Reproduce

Set a Chinese voice IME (e.g., iFlytek 讯飞, Sogou 搜狗) as the system's input method.
Open Chatbox and focus on the text input field.
Activate the voice input feature of the IME.
Dictate a relatively long piece of text (e.g., 50+ words), ideally with multiple sentences or a line break.
Pause speaking and wait for the IME to perform its AI correction on the entire text block.
Observe the lag or stuttering in the UI.
Expected Results
The input field should remain responsive and update the text smoothly without any noticeable lag or freezing, even when the IME processes and replaces the entire text block.

Actual Results
The Chatbox UI, specifically the input field, lags or freezes for a moment. The application becomes unresponsive until the IME's correction process is complete.

Screenshots
A screen recording would better demonstrate this issue than a static screenshot, as the problem is related to performance lag.

Desktop (please complete the following information):

Operating System: [Windows 10]
Application Version: [1.16.3]
Additional Context
This issue seems specific to how Chatbox's input component handles large text updates. The problematic IMEs use a specific method for AI-powered post-processing: after a pause in speech, they take the entire content of the text box, process it for corrections (punctuation, typo fixes, phrasing), and then replace the original text with the corrected version in one operation.

This process works flawlessly in most other applications, including standard text editors and web browsers. The lag in Chatbox suggests a potential conflict or inefficiency in handling this "full text replacement" event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions