Reference: Semi broken tts before refactoring
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user