fix: handle missing ffmpeg on windows and add devices alias
This commit is contained in:
@@ -5,11 +5,11 @@ import os from "node:os";
|
||||
import path from "node:path";
|
||||
import type { Readable, Writable } from "node:stream";
|
||||
|
||||
import ffmpegStatic from "ffmpeg-static";
|
||||
import { RealTimeVAD } from "avr-vad";
|
||||
|
||||
import type { AssistantRuntimeConfig } from "../config.js";
|
||||
import { Logger } from "../logger.js";
|
||||
import { requireFfmpegPath } from "./ffmpeg-path.js";
|
||||
import { takeFrame, int16ArrayToFloat32, float32ToPcm16Buffer } from "./pcm.js";
|
||||
import { ConversationMemory, type UserUtterance } from "../services/conversation.js";
|
||||
import { ElevenLabsSttService } from "../services/elevenlabs-stt.js";
|
||||
@@ -460,11 +460,7 @@ export class LocalVoiceSession {
|
||||
}
|
||||
|
||||
private getFfmpegPath(): string {
|
||||
const ffmpegPath = ffmpegStatic as unknown as string | null;
|
||||
if (!ffmpegPath) {
|
||||
throw new Error("ffmpeg-static 경로를 찾지 못했습니다.");
|
||||
}
|
||||
return ffmpegPath;
|
||||
return requireFfmpegPath();
|
||||
}
|
||||
|
||||
private describeSink(): string {
|
||||
|
||||
Reference in New Issue
Block a user