mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Properly check for system TTS support
This commit is contained in:
@ -1615,10 +1615,10 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
||||
|
||||
// Set empty promise resolution functions
|
||||
if (typeof resolve !== 'function') {
|
||||
resolve = () => {};
|
||||
resolve = () => { };
|
||||
}
|
||||
if (typeof reject !== 'function') {
|
||||
reject = () => {};
|
||||
reject = () => { };
|
||||
}
|
||||
|
||||
if (selected_group && !is_group_generating) {
|
||||
@ -4080,7 +4080,7 @@ function isHordeGenerationNotAllowed() {
|
||||
}
|
||||
|
||||
export function cancelTtsPlay() {
|
||||
if (speechSynthesis) {
|
||||
if ('speechSynthesis' in window) {
|
||||
speechSynthesis.cancel();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user