diff --git a/qwen3-asr-studio/App.tsx b/qwen3-asr-studio/App.tsx index c4ccd33..46cb544 100644 --- a/qwen3-asr-studio/App.tsx +++ b/qwen3-asr-studio/App.tsx @@ -290,7 +290,8 @@ export default function App() { } if (result.transcription) { - setNotification({ message: '输入法模式识别成功', type: 'success' }); + // 画中画窗口已经完成了复制,这里只显示通知 + setNotification({ message: '输入法模式识别成功,已复制到剪贴板', type: 'success' }); } if (result.transcription) { diff --git a/qwen3-asr-studio/components/PipView.tsx b/qwen3-asr-studio/components/PipView.tsx index 3f5df41..a7bf87e 100644 --- a/qwen3-asr-studio/components/PipView.tsx +++ b/qwen3-asr-studio/components/PipView.tsx @@ -59,6 +59,22 @@ export const PipView: React.FC = ({ if (result.transcription) { setMessage(result.transcription); + + // 输入法模式复制结果到剪贴板 + try { + const textArea = document.createElement('textarea'); + textArea.value = result.transcription; + textArea.style.position = 'fixed'; + textArea.style.left = '-999999px'; + textArea.style.top = '-999999px'; + document.body.appendChild(textArea); + textArea.select(); + document.execCommand('copy'); + document.body.removeChild(textArea); + } catch (copyError) { + console.error('复制失败:', copyError); + } + onTranscriptionResult({ transcription: result.transcription, detectedLanguage: result.detectedLanguage,