istoryItem.id);
}
function downloadHistoryItem(id) {
    const lang = document.documentElement.lang.startsWith('zh') ? 'zh' : 'en';
    const item = history.find(h => h.id === id);
    if (item && item.blob) {
        const sanitizedText = item.previewText.replace(/[^\w\u4e00-\u9fa5]/g, '');
        downloadAudio(item.blob, `${item.voice}_${sanitizedText}.mp3`);
    } else {
        showStatus(lang === 'en' ? 'Cannot download, audio data is missing. Please regenerate.' : '无法下载，音频数据已丢�