update:优化

This commit is contained in:
rainv123
2026-02-05 18:02:18 +08:00
parent fae6db2198
commit 7b3db72285
11 changed files with 47 additions and 76 deletions
@@ -1,4 +1,4 @@
import { log } from '../../utils/logger.js?v=0127';
import { log } from '../../utils/logger.js?v=0205';
// 检查Opus库是否已加载
@@ -1,7 +1,7 @@
// 音频播放模块
import BlockingQueue from '../../utils/blocking-queue.js?v=0127';
import { log } from '../../utils/logger.js?v=0127';
import { createStreamingContext } from './stream-context.js?v=0127';
import BlockingQueue from '../../utils/blocking-queue.js?v=0205';
import { log } from '../../utils/logger.js?v=0205';
import { createStreamingContext } from './stream-context.js?v=0205';
// 音频播放器类
export class AudioPlayer {
@@ -1,7 +1,7 @@
// Audio recording module
import { log } from '../../utils/logger.js?v=0127';
import { initOpusEncoder } from './opus-codec.js?v=0127';
import { getAudioPlayer } from './player.js?v=0127';
import { log } from '../../utils/logger.js?v=0205';
import { initOpusEncoder } from './opus-codec.js?v=0205';
import { getAudioPlayer } from './player.js?v=0205';
// Audio recorder class
export class AudioRecorder {
@@ -204,7 +204,7 @@ export class AudioRecorder {
if (this.isRecording) return false;
try {
// Check if WebSocketHandler instance exists
const { getWebSocketHandler } = await import('../network/websocket.js?v=0127');
const { getWebSocketHandler } = await import('../network/websocket.js?v=0205');
const wsHandler = getWebSocketHandler();
// If machine is speaking, send abort message
if (wsHandler && wsHandler.isRemoteSpeaking && wsHandler.currentSessionId) {
@@ -1,5 +1,5 @@
import BlockingQueue from '../../utils/blocking-queue.js?v=0127';
import { log } from '../../utils/logger.js?v=0127';
import BlockingQueue from '../../utils/blocking-queue.js?v=0205';
import { log } from '../../utils/logger.js?v=0205';
// 音频流播放上下文类
export class StreamingContext {