mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-29 13:23:55 +08:00
update:优化
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user