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