feat: add canBeUsed to TTSModule

This commit is contained in:
2026-01-14 20:38:10 -03:00
parent 0c394bdcbe
commit c5e6395b89
3 changed files with 9 additions and 0 deletions
+4
View File
@@ -32,6 +32,10 @@ class AzureTTS implements TTSModule {
return { data: Buffer.concat(buffers) }; return { data: Buffer.concat(buffers) };
} }
async canBeUsed(): Promise<boolean> {
return true;
}
} }
export default new AzureTTS(); export default new AzureTTS();
+4
View File
@@ -41,6 +41,10 @@ const ttsGoogle: TTSModule = {
resolve({ error: 'timed out' }); resolve({ error: 'timed out' });
}); });
}); });
},
async canBeUsed(): Promise<boolean> {
return true;
} }
}; };
+1
View File
@@ -13,6 +13,7 @@ export interface TTSModule {
name: string; name: string;
getVoices: () => Promise<Array<string> | undefined>; getVoices: () => Promise<Array<string> | undefined>;
generate: (voice: string, text: string) => Promise<TTSResponse>; generate: (voice: string, text: string) => Promise<TTSResponse>;
canBeUsed: () => Promise<boolean>;
} }
export class TTSManager { export class TTSManager {