Reference: Semi broken tts before refactoring

This commit is contained in:
2025-04-05 17:23:01 +00:00
parent e8eb93ae1b
commit e5a3016846
9 changed files with 909 additions and 333 deletions
+3 -1
View File
@@ -237,7 +237,9 @@ export class ElevenLabsTTSHandler extends ApiTTSHandlerBase {
* @returns {Promise<Object>} - Audio data (Blob)
*/
async generateSpeechAudio(text) {
if (!text || !this.apiKey) {
// Don't attempt to call the API if no API key is set or text is empty
if (!text || !this.apiKey || this.apiKey.trim() === '') {
console.log('ElevenLabs TTS: No API key provided or empty text, skipping API call');
return null;
}