Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion qwen3-asr-studio/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ export default function App() {
}

if (result.transcription) {
setNotification({ message: '输入法模式识别成功', type: 'success' });
// 画中画窗口已经完成了复制,这里只显示通知
setNotification({ message: '输入法模式识别成功,已复制到剪贴板', type: 'success' });
}

if (result.transcription) {
Expand Down
16 changes: 16 additions & 0 deletions qwen3-asr-studio/components/PipView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ export const PipView: React.FC<PipViewProps> = ({

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,
Expand Down