fix: handle missing ffmpeg on windows and add devices alias
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { Readable } from "node:stream";
|
||||
|
||||
import ffmpegStatic from "ffmpeg-static";
|
||||
import prism from "prism-media";
|
||||
|
||||
import type { AssistantRuntimeConfig } from "../config.js";
|
||||
import { resolveFfmpegPath } from "../audio/ffmpeg-path.js";
|
||||
|
||||
export interface PreparedSpeechAudio {
|
||||
stream: Readable;
|
||||
@@ -12,7 +12,7 @@ export interface PreparedSpeechAudio {
|
||||
|
||||
export class ElevenLabsTtsService {
|
||||
constructor(private readonly config: AssistantRuntimeConfig) {
|
||||
const resolvedFfmpegPath = ffmpegStatic as unknown as string | null;
|
||||
const resolvedFfmpegPath = resolveFfmpegPath();
|
||||
if (resolvedFfmpegPath && !process.env.FFMPEG_PATH) {
|
||||
process.env.FFMPEG_PATH = resolvedFfmpegPath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user