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
+14
View File
@@ -145,4 +145,18 @@ export class TTSHandler {
}
});
}
/**
* Get a unique identifier for the current voice configuration
* Used for caching purposes
* @returns {string} - Unique identifier for current voice
*/
getCurrentVoiceIdentifier() {
// Default implementation uses voice ID and rate/speed
const voiceId = this.voiceOptions.voice || 'default';
const rate = this.voiceOptions.rate || this.voiceOptions.speed || 1.0;
// Return a string that uniquely identifies this voice configuration
return `${voiceId}_${rate}`;
}
}