fix: make canBeUsed non async

This commit is contained in:
2026-01-14 21:50:54 -03:00
parent 5877644ed9
commit 4abc2ff594
5 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ class AzureTTS implements TTSModule {
return { data: Buffer.concat(buffers) };
}
async canBeUsed(): Promise<boolean> {
canBeUsed(): boolean {
return true;
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ const ttsGoogle: TTSModule = {
});
},
async canBeUsed(): Promise<boolean> {
canBeUsed(): boolean {
return true;
}
};
+3
View File
@@ -5,6 +5,9 @@ const ttsNone: TTSModule = {
getVoices: async (): Promise<Array<string>> => [],
generate: async (): Promise<TTSResponse> => {
return { data: Buffer.from([]) };
},
canBeUsed: (): boolean => {
return true;
}
};
+1 -1
View File
@@ -82,7 +82,7 @@ class PollyTTS implements TTSModule {
return {};
}
async canBeUsed(): Promise<boolean> {
canBeUsed(): boolean {
if (!config.aws_access_id || !config.aws_access_key)
return false;
return true;
+1 -1
View File
@@ -14,7 +14,7 @@ export interface TTSModule {
defaultVoice?: string;
getVoices: () => Promise<Array<string> | undefined>;
generate: (voice: string, text: string) => Promise<TTSResponse>;
canBeUsed: () => Promise<boolean>;
canBeUsed: () => boolean;
}
export class TTSManager {