Fixed exception. Added candleflicker.
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user