From c5e6395b89866f901b9c0ca76e38cfd42ebd2354 Mon Sep 17 00:00:00 2001 From: neru Date: Wed, 14 Jan 2026 20:38:10 -0300 Subject: [PATCH] feat: add canBeUsed to TTSModule --- src/modules/tts-modes/azure.ts | 4 ++++ src/modules/tts-modes/google.ts | 4 ++++ src/modules/tts.ts | 1 + 3 files changed, 9 insertions(+) diff --git a/src/modules/tts-modes/azure.ts b/src/modules/tts-modes/azure.ts index 2272758..cc9e127 100644 --- a/src/modules/tts-modes/azure.ts +++ b/src/modules/tts-modes/azure.ts @@ -32,6 +32,10 @@ class AzureTTS implements TTSModule { return { data: Buffer.concat(buffers) }; } + + async canBeUsed(): Promise { + return true; + } } export default new AzureTTS(); diff --git a/src/modules/tts-modes/google.ts b/src/modules/tts-modes/google.ts index 2d8c4e0..2f64b67 100644 --- a/src/modules/tts-modes/google.ts +++ b/src/modules/tts-modes/google.ts @@ -41,6 +41,10 @@ const ttsGoogle: TTSModule = { resolve({ error: 'timed out' }); }); }); + }, + + async canBeUsed(): Promise { + return true; } }; diff --git a/src/modules/tts.ts b/src/modules/tts.ts index 60ec0e3..ff9be93 100644 --- a/src/modules/tts.ts +++ b/src/modules/tts.ts @@ -13,6 +13,7 @@ export interface TTSModule { name: string; getVoices: () => Promise | undefined>; generate: (voice: string, text: string) => Promise; + canBeUsed: () => Promise; } export class TTSManager {