Fixed exception. Added candleflicker.

This commit is contained in:
2025-04-04 19:33:14 +00:00
parent 49a5af252c
commit c27ba8be6b
3 changed files with 807 additions and 727 deletions
+19 -1
View File
@@ -44,7 +44,8 @@ class TTSFactoryModule extends BaseModule {
'pause',
'resume',
'getVoices',
'getPreference'
'getPreference',
'isSpeaking'
]);
// Add dependencies
@@ -369,6 +370,23 @@ class TTSFactoryModule extends BaseModule {
return defaultValue;
}
/**
* Check if any TTS handler is currently speaking
* @returns {boolean} - True if speaking, false otherwise
*/
isSpeaking() {
if (!this.activeHandler || !this.handlers[this.activeHandler]) {
return false;
}
try {
return this.handlers[this.activeHandler].isSpeaking();
} catch (error) {
console.error("Error checking speaking status:", error);
return false;
}
}
/**
* Clean up when module is disposed
*/