From 19baa05f55adf34b7e4b0617d065455a000d4eab Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 5 Jan 2026 05:10:23 +0300 Subject: [PATCH] voice --- backend/src/voice/voice.controller.ts | 2 +- backend/src/voice/voice.service.ts | 2 +- src/hooks/useVoice.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/voice/voice.controller.ts b/backend/src/voice/voice.controller.ts index bf99c08..f42d382 100644 --- a/backend/src/voice/voice.controller.ts +++ b/backend/src/voice/voice.controller.ts @@ -26,7 +26,7 @@ export class VoiceController { @Res() res: Response, ) { this.logger.log('POST /voice/tts - Request received'); - const { text, voice = 'sarah' } = body; + const { text, voice } = body; this.logger.debug(`Request body: text="${text?.substring(0, 50)}...", voice=${voice}`); if (!text) { diff --git a/backend/src/voice/voice.service.ts b/backend/src/voice/voice.service.ts index d214d79..948570f 100644 --- a/backend/src/voice/voice.service.ts +++ b/backend/src/voice/voice.service.ts @@ -23,7 +23,7 @@ export class VoiceService { this.logger.log(`VoiceService initialized with URL: ${this.voiceServiceUrl}`); } - async generateTTS(text: string, voice: string = 'sarah'): Promise { + async generateTTS(text: string, voice?: string): Promise { this.logger.log(`Generating TTS for text: "${text.substring(0, 50)}..." with voice: ${voice}`); try { const url = `${this.voiceServiceUrl}/api/voice/tts`; diff --git a/src/hooks/useVoice.js b/src/hooks/useVoice.js index 80aabb4..e40f9b7 100644 --- a/src/hooks/useVoice.js +++ b/src/hooks/useVoice.js @@ -47,7 +47,7 @@ export function useVoice() { * @returns {Promise} Audio URL */ const generateSpeech = useCallback(async (text, options = {}) => { - const { voice = 'sarah', cache = true } = options; + const { cache = true } = options; // Check cache first const cacheKey = `${text}_${voice}`;