Replace ElevenLabs with local STT and TTS

This commit is contained in:
2026-04-30 03:21:30 +09:00
parent 5d636e8619
commit 73546c15b9
24 changed files with 943 additions and 326 deletions

View File

@@ -22,9 +22,9 @@ import type { AppConfig } from "../config.js";
import { Logger } from "../logger.js";
import { float32ToPcm16Buffer, int16ArrayToFloat32, Stereo48kToMono16kDownsampler, takeFrame } from "./pcm.js";
import { ConversationMemory, type UserUtterance } from "../services/conversation.js";
import { ElevenLabsSttService } from "../services/elevenlabs-stt.js";
import { ElevenLabsTtsService, type PreparedSpeechAudio } from "../services/elevenlabs-tts.js";
import type { LlmService } from "../services/llm.js";
import type { SttService } from "../services/stt.js";
import type { PreparedSpeechAudio, TtsService } from "../services/tts.js";
interface GuildVoiceSessionOptions {
client: Client;
@@ -33,8 +33,8 @@ interface GuildVoiceSessionOptions {
guild: Guild;
voiceChannel: VoiceBasedChannel;
textChannelId?: string;
stt: ElevenLabsSttService;
tts: ElevenLabsTtsService;
stt: SttService;
tts: TtsService;
llm: LlmService;
}