`&voice=${voice}`;
        }
        
        const response = await fetch(url);
        if (!response.ok) {
            const errorData = await response.json().catch(() => ({ error: `${response.status} ${response.statusText}` }));
            throw new Error(errorData.error);
        }
        
        audioBlob = await response.blob();
        if (audioBlob.type !== 'audio/mpeg') {
            throw new Error(lang === 'en' ? 'Invalid audio file received.' : '收到无效的音频文件。');
        }
   