// src/components/ChapterReader.tsx// 播放PCM音频const playPCMChunk = async (base64Audio: string): Promise => { return new Promise((resolve) => { if (!audioContextRef.current) { resolve(); return; } try { // 解码base64 const binaryString = atob(base64Audio); const bytes = new Uint8Array(binaryString.length); for (let i = 0; i < binaryString.length; i++) { bytes[i] = binaryString.charCodeAt(i); } // 创建AudioBuffer - 使用24000Hz采样率 const sampleRate = 24000; const audioBuffer = audioContextRef.current.createBuffer( 1, bytes.length / 2, sampleRate ); const channelData = audioBuffer.getChannelData(0); // 填充音频信息 (有符号16位PCM) const volumeGain = 0.8; // 音量增益,避免爆音 for (let i = 0; i < channelData.length; i++) { const sample = bytes[i * 2] | (bytes[i * 2 + 1] 32767 ? sample - 65536 : sample; channelData[i] = (signedSample / 32768.0) * volumeGain; } // 播放 const source = audioContextRef.current.createBufferSource(); source.buffer = audioBuffer; source.connect(audioContextRef.current.destination); source.onended = () => resolve(); source.start(); } catch (error) { console.error('播放音频失败:', error); resolve(); } });};关键技术点:采样率:必须使用24000Hz,与TTS服务返回的采样率一致有符号16位PCM:范围是-32768到32767,需要正确处理负值音量增益:设置为0.8,避免音量过大导致爆音队列播放:使用队列串行播放音频块,保证流畅性字符时间映射与实时高亮根据字符时间映射落地文字高亮:
不需要写一行脚本,不需要 XPath,不需要定位元素。你只需要说人话。为什么它能冲到 9000 star?
2倍。跨境电商进出口突破千亿元,全球枢纽功能进一步凸显。江苏机电产品出口表现突出,占全省出口总值超七成。
三、第二站:VIEWEXPORT — 外部工具链噩梦 既然平台原生命令靠不住,那就把工作外包出去。
三、分清安装包和源码:别点错那个绿色按钮 GitHub 新手最容易踩的坑,就是那个绿色的 Code 按钮。
#58720 修复 Input.OTP 根节点丢失 onPointerDown、onAnimationEnd、onTransitionEnd 和 onScrollEnd 等 DOM 事件回调的问题。
第三名含金量大幅上升 独立评测机构 Artificial Analysis 在 K3 仅有 API 时给出 Intelligence Index 57分,全球第三,与 Claude Opus 4.
私有化部署包下载量 我在官网上提供了完整的私有化部署包下载,截至 6 月,2026年已经实现了 1211 次下载。